FOXBOROUGH, Mass. — Eight days ago, the New England Patriots had a chance at an unbeaten season.

Now they’re trying to recover from their first back-to-back losses in more than three years.

Najee Goode scored on a blocked punt, Malcolm Jenkins returned an interception 99 yards for another touchdown and the Philadelphia Eagles held on for an improbable 35-28 victory over the Patriots on Sunday.

Darren Sproles returned a punt 83 yards for the Eagles’ second special teams touchdown, giving Philadelphia a 21-point lead before the Patriots came charging back.

Tom Brady threw for a touchdown to make it a two-score game and then, after an onside kick, ran it in from the 1-yard line to cut it to seven points with 3 minutes left.

New England’s second onside kick failed, but the Patriots (10-2) forced a third-down fumble to give Brady one more chance.

advertisement | advertise on newsday

The comeback fell short when Brady’s passes bounced out of his receivers’ hands.

Losers of three in a row, the Eagles (5-7) had given up 45 points apiece in consecutive weeks heading into the game against the defending NFL champions and their Super Bowl MVP quarterback.

Now it’s the Patriots on a losing streak — their first back-to-back, regular-season losses since 2012.

After falling behind 14-0, Philadelphia scored five touchdowns in a row — two on special teams, one on defense and two on offense.

Then the Patriots rallied.

NFL videos

After scoring twice but failing to convert a second onside kick, the Patriots got the ball back anyway when Jamie Collins stripped the ball from Kenjon Barner on third down. But the final drive stalled when the New England receivers dropped several passes.

Darren Sproles had 66 yards rushing, 34 receiving and 115 more on punt returns — including an 83-yard touchdown that made it 28-14 with 4:18 left in the third quarter.

After missing the previous two games with a concussion and left shoulder injury, Sam Bradford completed 14 of 24 passes for 120 yards and two touchdowns.

But the Eagles won this one with defense and special teams.

Just eight days removed from talk of an undefeated season, the Patriots’ injuries began to take their toll. Brady was without tight end Rob Gronkowski, top receiver Julian Edelman and No. 1 running back Dion James, and playing behind a reshuffled offensive line that couldn’t protect him.

advertisement | advertise on newsday

The Patriots took a 7-0 lead on a 4-yard pass from Brady to James White on the first play of the second quarter and made it 14-0 when Brady hit Danny Amendola from 11 yards with about 5 minutes left in the half.

But the Patriots, who possess in Stephen Gostkowski one of the best kickers in the league, decided on the ensuing kickoff to have special teams specialist Nate Ebner drop-kick the ball off. The ball floated behind the first line of defenders, where Seyi Ajirotutu fielded it at his 41.

It took eight plays for the Eagles to go 59 yards, with Bradford connecting with Zach Ertz from the 5 to make it 14-7. After stopping Philadelphia’s two-minute offense and forcing a punt, the Patriots took over at their 13 and picked up a quick first down.

But Brady was sacked and New England stalled at their 38 with 15 seconds remaining.

Ryan Allen’s punt was blocked by Chris Maragos. Goode scooped it up and ran it 24 yards for the touchdown to send the teams into the break tied 14-all.

advertisement | advertise on newsday

Brady had thrown just four interceptions all season — and had never in his career been picked off by the Eagles. But he was charged with one when Jenkins grabbed a deflection and gave the Eagles a 21-14 lead midway through the third quarter.

When the Patriots were forced to punt on their next possession, Sproles broke free for an 83-yard touchdown.

The Patriots moved the ball thanks to a direct-snap, end-around pass to Brady that gained 36 yards — his first reception since 2001. But on the next play, Brady lobbed the ball into the end zone and it was picked off by Byron Maxwell.

Bradford led the Eagles on a 12-play drive to make it 35-14 on a 10-yard pass to Jordan Matthews.

Only then did New England rally.

Brady made it a 14-point game on a 14-yard pass to Scott Chandler, then the Patriots recovered an onside kick. Brady’s 1-yard sneak with 3 minutes left made it 35-28.

The ensuing onside kick attempt went out of bounds, and Philadelphia ran the clock down to just over 1 minute. On third down, with a chance to run off all but 20 seconds left on the clock, Barner fumbled.