Carson Wentz led the Philadelphia Eagles on a seemingly improbable comeback against the New York Giants and sealed it with a touchdown pass to Boston Scott with 40 seconds left in the fourth quarter.

The Eagles capitalized on the Giants’ miscues late in the fourth quarter to pull off the win.

WATCH: GIANTS' DANIEL JONES BLOWS CHANCE TO SCORE WIDE-OPEN TOUCHDOWN VS. EAGLES, WAYNE GALLMAN SALVAGES DRIVE

Philadelphia’s comeback started with about 6 minutes to play in the game. The Giants had gone up 12 points late in the game and with the way the defense was playing it appeared the Eagles didn’t have any answers.

With 4:42 left in the fourth, Wentz fired a 3-yard touchdown pass to Greg Ward Jr. to bring the game within five points. The Giants had a chance to extend their drive but a pass from Daniel Jones to Evan Engram was dropped as it hit the tight end’s hands.

The miscue and a slew of ensuing penalties led to Wentz leading a six-play, 71-yard play concluding with an 18-yard touchdown pass to Scott.

49ERS' JIMMY GAROPPOLO ENDED UP IN A DITCH AFTER THE PATRIOTS TRADED HIM TO SAN FRANCISCO

Jones would attempt to lead the Giants back down the field but the ball was knocked out of his hands and the Giants failed to recover the fumble, giving the Eagles the win.

Wentz was 25-for-43 with 359 passing yards and two touchdown passes and an interception. Scott had 12 carries for 46 yards and the game-winner.

Jones was 20-for-30 with 187 yards, two touchdown passes and an interception. He also had 92 yards on the ground, including an 80-yard stumble in which he nearly scored a touchdown. Luckily, Wayne Gallman was able to punch it in from 1-yard out.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

With the win, the Eagles move to 2-4-1 and are still in the race for the NFC East crown. At 1-6, the Giants are not totally out the race for the division but blowing a 12-point lead in the fourth quarter is not going to make anyone believe the team can go all the way.