PHILADELPHIA —Held in check most of the game, Matthew Stafford rallied the desperate Detroit Lions to victory.

Jason Hanson kicked a 45-yard field goal in overtime and the Lions overcame a 10-point fourth-quarter deficit to beat the Philadelphia Eagles 26-23 on Sunday.

Stafford led Detroit to 17 points in the fourth period, throwing a TD pass and running for a score. He finished with 311 yards passing, one TD and one interception.

The comeback prevented the Lions (2-3) from a 1-4 start a year after opening 5-0 en route to their first playoff appearance since 1999. The Eagles (3-3) head into their bye week with two straight losses.

Detroit had two shots from the Eagles 1 following a pass interference penalty on Colt Anderson with 13 seconds left in regulation. But Stafford misfired on both passes and Hanson kicked a 19-yard field goal to send it to overtime.

The Lions then sacked Vick on the first two plays of the extra quarter, forced a punt out of the end zone and started at midfield.

Stafford hit Calvin Johnson for a 17-yard gain to the Eagles 27 on first-and-20. A few plays later, Hanson nailed the winner.

Johnson had 135 yards receiving, but the All-Pro wide receiver still has no TD catches from Stafford this season. He was called for offensive pass interference to negate his 11-yard TD grab in the fourth quarter.

The undisciplined Lions overcame 16 penalties, most in the NFL this season.

After Detroit closed within 16-13 in the fourth, the Eagles got their biggest play of the season when Vick connected with Maclin on a deep slant pass. It was Philadelphia’s first play for more than 49 yards all season.

No problem for the Lions. Stafford had found his groove.

Stafford threw a 57-yard pass to Tony Scheffler to get deep in Eagles territory and then tossed a 17-yard pass to Nate Burleson to cut it to 23-20 with 3:32 left.

The Eagles went three-and-out and Stafford drove the Lions downfield to tie.

Vick shook off a poor start and the offense finally got going late in the second quarter. Vick completed four straight passes at one point for 48 yards, including a 17-yarder to Maclin on third-and-10. He hit LeSean McCoy on a 2-yard pass to put Philadelphia up 7-6.

The Eagles increased their lead to 10-6 on Alex Henery’s 26-yard field goal on the first series of the second half.

Henery kicked a 32-yarder to make it 13-6 after Brent Celek was called for offensive pass interference to negate his 3-yard TD catch.

That penalty turned out to be the difference.

Henery’s 49-yarder early in the fourth extended the margin to 16-6 for Philadelphia’s biggest lead of the season.

But the Lions got right back in it when Stafford led an 80-play drive, finishing it with a 1-yard run to make it 16-13. Johnson, held to just one previous catch, caught passes of 37 and 20 yards on the drive.

On Philadelphia’s next play, Chris Houston intercepted Vick’s deep pass to DeSean Jackson at the Lions 34. But the Eagles held on defense, setting up Vick-to-Maclin.

Stefan Logan’s 48-yard punt return set up Hanson’s 46-yard field goal for a 3-0 lead. Hanson’s 34-yarder made it 6-0.

The Eagles then drove to the Lions 32 before an early snap by Dallas Reynolds eluded Vick and was recovered by Stephen Tulloch at the 45.

Vick’s streak of three straight games without getting picked ended when his wildly overthrown pass to Jason Avant was intercepted by Louis Delmas in the second quarter. It was Vick’s 12th turnover of the season and just the first interception of the season for Detroit.