By John Wawrow, Associated Press

ORCHARD PARK, N.Y. — Josh Allen sailed a 2-point conversion attempt wide of open receiver Khalil Shakir in the back of the end zone with 5 seconds remaining, and the Philadelphia Eagles hung on for a 13-12 win over the Buffalo Bills on Sunday.

Dallas Goedert caught a 1-yard touchdown pass, Jake Elliott hit field goals of 28 and 47 yards, and the Super Bowl champion Eagles barely avoided squandering a 13-0 fourth-quarter lead. Linebacker Jalyx Hunt had two of Philadelphia’s four sacks and a team-leading three quarterback hits.

Defensive tackle Jalen Carter made a major contribution in his return after missing three games with a injuries to both shoulders. Carter got his hand up to block Michael Badgley’s extra-point attempt after Allen’s 2-yard touchdown run with 5:11 left.

Allen scored on a tush push on fourth-and-goal to pull the Bills within one point with 5 seconds remaining. The Bills thought they had a touchdown one play earlier, but Dawson Knox was ruled short of the goal line after a replay review.

Rather than playing for overtime, coach Sean McDermott opted to go for 2. Allen dropped back in the pocket and had a defender in his face when he let loose a pass that was about a foot wide of Shakir. The Bills then tried an onside kick that Goedert recovered.

The NFC East champion Eagles (11-5) are assured of at least the conference’s third seed entering the playoffs.

Buffalo (11-5), which clinched a playoff berth last week, dropped to the No. 7 seed in the AFC. New England clinched its first AFC East title since 2019 with the Bills’ loss.

Injuries

Eagles: LB Nakobe Dean (hamstring) did not play.

Bills: LB Terrel Bernard did not return after hurting his calf in the first half. … Defensive tackles DaQuan Jones (calf) and Jordan Phillips (ankle) and safety Jordan Poyer (hamstring) did not play. TE Dalton Kincaid missed his fourth of seven games with a nagging knee injury.

Up next

Eagles: Host Washington next weekend.

Bills: Host the New York Jets next weekend.