ARLINGTON, Texas (AP) — Andy Dalton threw for 377 yards and three touchdowns, two to Michael Gallup, and the Dallas Cowboys stayed alive in the playoff race with a 37-17 victory over the Philadelphia Eagles on Sunday.

The Cowboys (6-9) won their third consecutive game and still have a chance to win the NFC East thanks to Washington’s 20-13 loss to Carolina, which guaranteed that the NFL’s worst division won’t have a team with a winning record.

Dallas can overtake Washington (6-9) with a win at the New York Giants and a Washington loss to the Eagles on the final weekend of the regular season. The Giants (5-10) can get in by beating the Cowboys if Washington loses.

The Eagles (4-10-1) led 14-3 in the first quarter after DeSean Jackson’s 81-yard touchdown catch in his first game in two months coming off an ankle injury, and they would have controlled their playoff fate against Washington with a win.

Instead, Philadelphia and Jalen Hurts couldn’t keep the offense rolling while giving up points on five consecutive Dallas possessions. The defending NFC East champion was eliminated from the postseason with its sixth loss in seven games.

The top three Dallas receivers each had a catch of at least 50 yards. Rookie CeeDee Lamb’s 52-yard touchdown put the Cowboys up 27-17 early in the third quarter, Gallup’s 55-yarder on a screen set up a field goal between his two TDs, and Amari Cooper had a 69-yard catch before another of Greg Zuerlein’s three field goals.

Dalton, who was 22 of 30 while surpassing 300 yards for the first time since replacing the injured Dak Prescott five weeks into the season, gave the Eagles life late in the third quarter by forcing a deep throw to Lamb that Darius Slay intercepted.

But that opportunity fizzled when coach Doug Pederson elected to go for it on fourth-and-15 from the Dallas 33 early in the fourth quarter and Zach Ertz was stopped well short on an underneath throw.

Hurts had two turnovers with Philadelphia in scoring range later in the fourth quarter. Anthony Brown intercepted the rookie at the goal line, and Hurts fumbled at the end of a run on a close call that was held up on review. Hurts had a second interception with the game well out of reach in the final minute.

Making his third start since the benching of Carson Wentz, Hurts led an offense that generated 285 yards in the first half before stalling while the Cowboys surged to the lead.

Hurts was 21 of 39 for 342 yards with 69 yards rushing, joining Lamar Jackson as the only QBs in the past 70 years with at least 50 yards rushing in each of his first three starts.

Cooper and Gallup had 121 yards receiving apiece, and Lamb helped finish off the Eagles by drawing a 34-yard pass interference penalty on third down to set up his 19-yard scoring run in the final two minutes.

(© Copyright 2020 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)