DETROIT (AP) — The Buffalo Bills crashed Detroit's Thanksgiving party, making themselves at home for their second victory in five days at Ford Field.

Tyler Bass made a tiebreaking 45-yard field goal with 2 seconds left after missing an extra point late in the fourth quarter, lifting Buffalo to a 28-25 win over Detroit on Thursday.

“It was very deja vu-ish," said Josh Allen, who set up the game-winning kick by starting the drive with a 36-yard pass to Stefon Diggs and running twice for 12 yards. Allen led the Bills with 78 rushing yards.

The Bills were back in the Motor City after the NFL moved their previous home game against Cleveland because a winter storm dumped several feet of snow in western New York.

Buffalo became the third NFL team to play two games in five or fewer days on the road in the same stadium, and the first to win both.

And the Bills equaled the number of wins Detroit has this season at its indoor stadium.

Buffalo (8-3) has won two straight — after losing two in a row — to move a half-game ahead of Miami in the AFC East.

After Bass made the game-winning kick, Allen and Diggs embraced on the sideline.

“Let's get back to having fun again," Diggs recalled telling Allen after making eight catches for 77 yards and a score. “We got away from that a little bit."

Allen threw a go-ahead, 5-yard touchdown pass to Diggs with 2:40 left, but Bass missed the extra point to make it 25-22 after the kicker matched his and the franchise record with six field goals in an eight-point win over the Browns on Sunday.

Allen had a passing and rushing touchdown in the first half, finishing 24 of 42 for 253 yards to more than make up for throwing his 11th interception of the season. He has accounted for 162 touchdowns, trailing only Hall of Famer Dan Marino's total of 171 for the most by an NFL player in his first five seasons.

The Lions converted fourth-and-1 from midfield with Amon-Ra St. Brown's 7-yard end-around to set up Michael Badgley's game-tying, 51-yard field goal with 23 seconds to go. Badgley missed a 29-yard field goal late in the third and Jared Goff took a sack for a safety in the same quarter and those mistakes proved to be costly.

Detroit (4-7) missed an opportunity to win four straight games for the first time since 2016 and lost a franchise-record sixth straight game on Thanksgiving.

”I told them this one should sting,” coach Dan Campbell said. “We had a chance to win and we didn’t make it, but I don’t think this was a step backward. I’m frustrated, but we’re getting better. ”

PIVOTAL PLAYER

Buffalo defensive tackle Ed Oliver forced and recovered a fumble in the first half, leading to Allen's tiebreaking, 3-yard touchdown run in the second quarter. Oliver also sacked Goff for a safety, three plays after Allen threw an interception at the Detroit 4, to put the Bills ahead 19-14 early in the third quarter.

INSTANT IMPACT

The Lions promoted linebacker James Houston from the practice squad and he became the first player in franchise history to have more than one sack in his NFL debut.

CODE RED

Allen’s interception in the third quarter was the sixth turnover for Buffalo in the red zone, surpassing the total it had the previous three seasons.

INJURIES

Bills: Edge rusher Von Miller (right knee) and LT Dion Dawkins (knee) left the game with injuries, and coach Sean McDermott said he didn't have an update on their status.

Lions: DE Julian Okwara (elbow) was hurt during the game and Campbell said CB Jerry Jacobs left the game after he felt dizzy.

UP NEXT

Bills: Play at New England on Thursday night.

Lions: Play Jacksonville at home on Dec. 4.