Carson Wentz turned the ball over three times in the first half, then followed that by opening the second half with an interception. But this is the NFC East, so the Eagles won anyway, 23-9, at Lincoln Financial Field in one of the most inelegant efforts ever foisted upon a national TV audience.

“We’re going to have to figure some things out. Obviously, we’re happy and excited with the win, and all of that, but we’ve got some things we’ve got to figure out here, this week,” Eagles coach Doug Pederson said.

“I have to be better. ... Some of it, maybe not on the same page [with receivers], some of it -- that first fumble, I’ve got to throw the ball away,” Wentz said. He said he would continue to take shots downfield that led to interceptions on throws to rookies Jalen Reagor and John Hightower, both passes picked by corner Trevon Diggs.

“I’m going to pull the trigger. I’ve never been wired to hesitate,” said Wentz, who now leads the NFL in turnovers. “I can put it in a better spot, I can give these guys better opportunities."

On the deciding play, the Eagles finally drove home an advantage that should have been overwhelming enough to push them ahead by several touchdowns, but they were leading only 15-9, and Dallas was driving, behind seventh-round rookie quarterback Ben DiNucci, in his first NFL start.

Third-and-6 from the Eagles' 21, linebacker T.J. Edwards, in his first game back from a three-game hamstring absence, blew through the middle on a blitz and slammed into DiNucci’s midsection, separating the rookie from the ball.

At one point, Vinny Curry seemed to have it, lying on the ground, but the ball was wriggling around, Dallas guard Connor Williams swatting at it. It squirted free and away from the pile, and Rodney McLeod saw it and picked it up.

Several Cowboys seemed to think the whistle had blown, but it had not. McLeod ran 53 yards for his first touchdown since 2015, when he played for the Rams. With 5 minutes, 18 seconds remaining and a 12-point lead against an offense that did not score a touchdown all evening, that really was it.

McLeod said afterward he thought the whole time the play would come back; he thought linebacker Duke Riley was offside, but on replay, it seemed that Riley must have gotten back before the ball was snapped. Edwards said that Riley just took a jab-step, then stepped back. He didn’t think Riley ever crossed the line.

McLeod said defensive coordinator Jim Schwartz called a lot of pressures against DiNucci, “but that was the first time we called that one, in particular.”

McLeod said he was surprised to see the ball fly out of the scrum. “It was just, ‘secure the bag.’ Pick it up, make sure you get possession, and after that, get to the end zone. I’m glad [Riley] got back onside.”

“We needed a little spark there at the end,” Edwards said. “I honestly got up from the tackle, I was looking at the sideline for the next call,” thinking the ball was down, before it got out to McLeod. “It was honestly kind of crazy.”

A little later, Dallas, pinned deep, took an intentional safety to set up an onside kick that failed, McLeod making the recovery there, as well. That sequence set the final score.

The advantage of facing a quarterback in DiNucci whose longest completion of the night went for 15 yards, who finished 21 for 40 for 180 yards with four sacks and two lost fumbles, was squandered by Wentz and a balky, hesitant offense. DiNucci’s 64.6 passer rating might have been pretty much what one might have predicted going in, but nobody outside of Dallas would have predicted that his passer rating would be higher than Wentz’s 61.2. The Eagles’ franchise quarterback completed 15 of 27 passes for only 123 yards, took four sacks, was intercepted twice, and fumbled twice, though he threw for two touchdowns.

“We can’t turn the ball over. ... We just got to take ownership of it. We can’t really do the things we’re doing in order to really survive in this league,” Pederson said. “We’ve got to get better. We’ve got to fix it. We’ve got to fix it in a hurry.”

For uncomfortably long stretches of the second and third quarters, the Eagles seemed intent on bumbling into their bye week off a season-defining loss; Wentz and Pederson made this game against a 2-5 (now 2-6) team, that was giving up an average of 178.3 rushing yards and 34.7 points per game, a lot harder than it needed to be.

The Eagles, now 3-4-1, winners of two in a row for the first time this season but not exactly on a roll, took the lead for good late in the third quarter, the first time they’d pieced together a normal-looking drive since their second possession of the game.

On third-and-3 from the Dallas 9, Wentz hit Travis Fulgham in the left corner of the end zone for a touchdown that gave the home team a 15-9 lead, after Wentz and Reagor connected on a two-point conversion play. It was Fulgham’s fourth touchdown in his five Eagles games. His six catches accounted for 78 of the Eagles' 132 passing yards (one catch came from Jalen Hurts).

Earlier, DiNucci did not look overwhelmed on the first drive of the game, in which the Dallas coaching staff showed it had an idea of what to do against the Eagles. The Cowboys took a 3-0 lead on a 49-yard Greg Zuerlein field goal. The key play on a nine-play, 47-yard drive was a 19-yard double-reverse.

The Eagles' first series was a disaster, as has too often been the case. After a 19-yard Boston Scott run, Jordan Mailata, making his first start at right tackle, with Lane Johnson battling knee and ankle injuries, completely whiffed on DeMarcus Lawrence, and Wentz was sacked.

The next snap, Wentz couldn’t find a receiver, was trying to buy time as Dallas Goedert left the blocking corps late for a dump-off, and Wentz seemed oblivious to the pressure of safety Donovan Wilson. Wilson sacked Wentz, knocked the ball out of his passing hand just before they hit the ground, then recovered the fumble. It was Wentz’s 13th turnover of the season, and a really bad omen.

But Brandon Graham saved the day, or at least the moment, as he has done a time or two over the years. Second-and-goal from the Eagles' 7, he sacked DiNucci, forced a fumble, and recovered it at the 17.

Wentz then drove the Eagles 83 yards in 10 plays for the go-ahead touchdown. He rolled right from the Dallas 2 and found Reagor, who waved the ball over the pylon for his first NFL touchdown. Reagor was playing for the first time since Week 2, when he suffered a broken thumb against the Rams.

When the Eagles got the ball back – DiNucci looked incapable of doing anything with it – they drove into Dallas territory, and then the wheels fell off. Wentz danced around a while before throwing the ball away on third-and-4 from the Dallas 45. Then they went for it on fourth down. Wentz was hit and fumbled again.

Dallas “drove” 15 yards in six plays for another field goal.

At this point, the Eagles' stumbling and bumbling was merely annoying. It quickly cascaded toward egregious, and barreled right on through to unfathomable, without a stop.

Pederson felt the need to call a third-down double-reverse, against the team giving up the most points per game in the NFL. It didn’t work. Dallas still couldn’t move the ball, and the Eagles got it back. They got to the Cowboys' 34. Wentz lofted a bomb to the end zone to Reagor. Dallas corner Trevon Diggs made an amazing interception. No Eagles points.

“We’re in a position to put points on the board. Can’t do that,” Pederson said. “We just gotta keep working.”

Asked what the offensive trickery was about, against such a bedraggled defense, Pederson said: “It was about trying to win the game. That’s what it was about.”

But Dallas again was inept. The Eagles got the ball back with 1:43 remaining in the first half. Fourth-and-1 from the Dallas 44, with a little less than a minute remaining, they elected to let the clock run to 32 seconds before calling a timeout in order to leave as little time as possible if they didn’t make it. Why not just sneak Wentz, then call the timeout, and keep about 20 seconds to, say, try to score a touchdown?

Wentz’s fourth-down pass did not connect with Fulgham. The Cowboys still had time to go 14 yards in five plays, setting up the 59-yard Zuerlein field goal that sneaked over the crossbar, giving Dallas a 9-7 halftime lead.

The Eagles lost their top corner, Darius Slay, to an ankle injury, and defensive tackle Malik Jackson left the game after aggravating his quad injury. Jason Peters made it through the whole evening at left tackle in his first appearance since Week 3.

“We get some players back, try to get back to full strength, and see what happens,” Pederson said. The Eagles hit their bye in first place in the NFL’s worst division.

Asked if he thought this was a good time for Wentz to get a bye week, Pederson said: “I think this is a good time for all of us.”