Skip to main content
Open this photo in gallery:

Buffalo Bills wide receiver Gabe Davis (13) catches a touchdown pass against the Miami Dolphins during the second half in a NFL wild card game at Highmark Stadium in Orchard Park, N.Y. on Jan. 15.Gregory Fisher/USA TODAY Sports via Reuters

Josh Allen shrugged off a three-turnover outing by throwing two touchdown passes 3:11 apart in the third quarter, and rallying the Buffalo Bills to a 34-31 win over the injury-depleted Miami Dolphins in an AFC wild-card matchup on Sunday.

Cole Beasley scored the go-ahead touchdown with a 6-yard catch, and Gabe Davis extended the lead to 34-24 with a 23-yard TD reception in a game where Buffalo squandered an early 17-0 lead.

“Doesn’t matter how we win, it’s if we win, and I’m proud of our guys for playing the way they did,” Allen said.

The Bills defense, which forced six punts and two turnovers, then held on to secure the win when Miami turned the ball over on downs on its final possession.

Rookie Skylar Thompson’s pass on fourth-and-6 went just off the fingertips of tight end Mike Gesicki with 2:22 remaining.

Buffalo was able to run out the clock when Devin Singletary bulled his way for a 7-yard gain to convert a third-and-7.

It was a sloppy game played between two division rivals, and the outcome fitting after Miami and Buffalo split their regular-season series in games decided by a combined five points. The Dolphins beat Buffalo 21-19 at Miami in September, with the Bills rallying to beat Miami 32-29 last month.

Allen finished 23 of 39 for 352 yards and three TDs, but also threw two interceptions, which resulted in the Dolphins scoring 10 points. He also lost a fumble while being sacked by Eric Rowe, with Zach Sieler recovering the ball and returning it 5 yards for a touchdown to put Miami ahead 24-20, just 61 seconds into the third quarter.

“It’s a one-week season, that’s it,” Allen said. “All that matters is surviving and advancing.”

As the AFC’s second seed, Buffalo advances to host either the third-seeded Cincinnati Bengals or fourth-seeded Jacksonville Jaguars in the divisional round. Their matchup will be determined after the Bengals host Baltimore on Sunday night.

A potential Bills-Bengals matchup would come three weeks after their game was canceled when Buffalo safety Damar Hamlin went into cardiac arrest and needed to be resuscitated on the field.

The Dolphins played tough in a game they entered as 13 1/2-point underdogs, according to FanDuel Sportsbook. They were down numerous starters and trailed 17-0 with 12:46 left in the second quarter when Tyler Bass hit a 33-yard field goal.

The Dolphins defense and special teams made up for an offense that was down to its third-string quarterback in Thompson. Miami rallied to tie the game by taking advantage of two interceptions and Cedric Wilson’s 50-yard punt return.

Thompson, a seventh-round pick out of Kansas State, finished 18 of 45 for 220 yards with a touchdown pass to Gesicki, and two interceptions. He was making his third career start in place of Tua Tagovailoa, who is still in the concussion protocol and with backup Teddy Bridgewater dealing with a dislocated pinky finger.

The Dolphins were also missing running back Raheem Mostert (broken thumb), and featured a patchwork offensive line missing starting left guard Liam Eichenberg (hand) and starting right tackle Brandon Shell (knee/ankle). Starting left tackle Terron Armstead, meantime, played despite missing two of three practices because of injuries to his toe, pectoral muscle, knee and hip.

Thompson took the blame saying, “I feel like our operation in general was troubled at times, and I take full responsibility for that.”

And yet, to his credit, he and the Dolphins — making their first postseason appearance since 2016 — came within a score of knocking off the three-time defending AFC East champs.

“Heartbroken for the guys because they didn’t want their season to end, and they did everything they could,” Dolphins coach Mike McDaniel said.

The Dolphins extended their run of playoff loses to five. The Dolphins’ most recent playoff win was a 23-17 overtime victory over Indianapolis on Dec. 30, 2000 in the wild-card round.

Buffalo didn’t resemble a team that closed the season reeling off seven straight victories.

Instead, the Bills looked as if they were running out of adrenalin after an emotionally draining week, and a season full of disruptions.

Hamlin was with the team in spirit, while live-tweeting during the game from home, where he continues to recover. A message Hamlin posted on his Twitter account about an hour before kickoff read: “My heart is with my guys as they compete today! ... Nothing I want more than to be out there with them.”

The 24-year-old Hamlin was released from a Buffalo hospital on Wednesday and visited with his teammates at the Bills facility on Saturday.

Cornerback Tre’Davious White said Hamlin’s visit “gave us a lot of juice.” for this game. “It lifted our spirits for sure,” he added.

Follow related authors and topics

Authors and topics you follow will be added to your personal news feed in Following.

Interact with The Globe