PHILADELPHIA -- Tony Romo threw two touchdown passes that kept Dallas even through three quarters. Then the Cowboys let their defense and special teams run wild in the end zone to win big and pump some life back into the NFC East race.
The Cowboys (4-5) and are second in the NFC East, 1 1/2 games behind the New York Giants, who lost to Cincinnati earlier Sunday.
The win, and a break in the schedule, could propel the Cowboys back in the thick of the division race. They will play five of their next six games at home, starting Sunday against Cleveland.
"Don't use words like desperate," Romo said. "The importance was at its highest level. I don't know if we are thinking anything more than we need another win."
The latest game between these fierce rivals was more about salvaging a season than playing with something big on the line.
The Eagles (3-6) lost Michael Vick to a concussion after consecutive bruising hits in the second quarter and have lost five straight games under coach Andy Reid for the first time in his 14 seasons.
Rookie Nick Foles filled in for Vick and briefly rallied the Eagles until the Cowboys started showing some touchdown versatility. Romo hit Dez Bryant on a 30-yard pass on the final play of the third quarter, and Harris and Carr scored their TDs in the fourth quarter.
The loss could speed up the countdown clock on Vick's and Reid's time in Philadelphia.
Foles hit the field in the second quarter and was greeted by a loud ovation from a crowd that had become fed up with Vick's erratic play.
Vick was knocked on his back by linebacker Ernie Sims on an incomplete pass and was slow to get up. He headed for the locker room and Foles started warming up. Vick, however, may have been injured on the previous play when he was driven from behind headfirst into the ground by Jay Ratliff.
Vick did not talk to reporters but appeared groggy in the locker room.
It might be too late for the Eagles, no matter who the quarterback is, to save their season.
Reid said he'd determine the starter for Sunday's game at Washington based on Vick's health
"I was hoping he'd make it through without having a concussion, but that's where we sit right now with him," Reid said.
Foles, a fan favorite without ever throwing a regular-season pass, looked like an instant hit and woke up a sleepy crowd in the third quarter when he hit Jeremy Maclin for a 44-yard TD and a 14-10 lead. Alex Henery's 40-yard field goal made it 17-10.
Foles was rolling, the Eagles were scoring, and the good times were back at Lincoln Financial Field.
But in a season unraveling with each bumbling defeat, the Eagles were knocked down to reality.
Romo, who finished 19 of 26 for 209 yards, tied it with that TD pass to Bryant.
Dallas coach Jason Garrett had insisted the Cowboys weren't desperate after losing four of five. And they were dominant in the fourth period. The Cowboys need to keep playing like they did late on Sunday for a shot at catching the Giants.
Owner Jerry Jones refused to call the win a season saver.
"I don't want to do that," he said. "You can, but I don't want to do it. I know how important the game is to us."
Early in the final quarter, Foles had an interception return for a touchdown wiped out on a holding penalty. No worries, Dallas. Harris returned a punt 78 yards for a 24-17 lead that silenced the crowd.
On the next drive, Foles had an interception returned for a score that counted, by Carr, returned 47 yards for a 31-17 lead.
That was it for the fans in green, who fled for the exits. Stanley Havili had a 1-yard TD run with 1:55 left, but Henery missed the extra point.
Then Foles fumbled after sacked and Mike Jenkins recovered for a touchdown.
"Critical win for us," Garrett said. "I thought the effort was there. I thought we were focused the whole game. When you have success, you have to play through it, you have adversity, you have to play through it, and today was a good example of that."
In the final minutes, fans behind Dallas' bench unrolled a banner that read, "Andy, Quit, Your Team Has!"
Foles was 22 of 32 for 209 yards and one touchdown.
"Not good enough to win," Foles said. "I made some mistakes and I can't turn the ball over. That's the most important thing to win games."
Vick, the four-time Pro Bowl quarterback, has struggled this season and entered with 10 touchdowns and nine interceptions.
He looked like his old self on the first drive, finishing it by connecting with Riley Cooper for a 2-yard TD. Cooper's sensational one-handed grab on a fade route gave the Eagles their first points on their opening drive all season.
Foles was the first Eagles rookie QB to throw a TD pass since AJ Feely in 2001. Brian Westbrook, a running back, threw one in 2002. ... The Eagles had won six straight division games, including a sweep of the Cowboys. ... Eagles WR Jason Avant left with a hamstring injury. ... Sims started 15 games for the Eagles in 2010 and had two sacks.
What led Tom Brady to leave the Patriots?
Louis Riddick provides his perspective on why Tom Brady decided to part ways with Bill Belichick and the Patriots.
Michael Strahan defends Daniel Jones amid Giants' struggles
Michael Strahan joins SportsCenter to discuss his former team and what it will be like to have his No. 92 jersey retired.
Spears worried rib injury will put 'injury-prone' tag on Tua
Marcus Spears details why he is afraid that Tua Tagovailoa is going to get the "injury-prone" tag after being ruled out with a rib injury.
Are the Chiefs in the midst of a dynasty?
Kimberley Martin and Domonique Foxworth break down whether the Chiefs are in the midst of a dynasty.
Are the Cowboys legitimate Super Bowl contenders?
Dominique Foxworth examines the areas the Cowboys still need to improve if they want to lift the Lombardi trophy this season.
NFL Week 3 fantasy football inactives watch - Who's in and who's out?
AJ Mass provides updated inactives and analysis based on the latest reports and official announcements leading up to kickoff.