A coach and quarterback facing questions about their futures in Miami accomplished what they have done best for a win the Dolphins had to have to maintain playoff hopes.
The collaboration of Ryan Tannehill and coach Adam Gase has been most effective at Hard Rock Stadium over the past three seasons.
They got the job done again, but just barely, in a 21-17 thriller Sunday against the Bills.
It came down to a desperation toss and a diving attempt by a former Dolphin. Bills tight end Charles Clay, who started his career with Miami, couldn’t hold rookie quarterback Josh Allen’s fourth-down throw in the end zone in the final minute.
The Dolphins improved to 5-1 at Hard Rock Stadium to counter their 1-5 mark away and maintain playoff hopes at 6-6 before the AFC East-leading Patriots visit next week.
Tannehill threw his third touchdown pass of the day with 8:42 remaining on a 13-yard toss to Kenny Stills, who made a superlative catch as the Dolphins regained a lead they had squandered early in the fourth quarter.
He finished 16-of-24 for 137 yards with one interception and a passer rating of 103.6.
Two interceptions by cornerback Xavien Howard, which brought his season total to seven, led a solid defensive effort against the Bills and Allen.
Allen, taken seventh in the 2018 draft, gave the Dolphins fits in running for 135 yards on nine carries. He threw two touchdown passes to Zay Jones, including a go-ahead score with 12 minutes remaining. Jones also caught the two-point conversion from Allen for a 17-14 Buffalo lead.
The Dolphins led 14-6 at halftime but got little going on offensive during most of the second half.
That changed on a 75-yard drive that ended with Stills outjumping two defenders for what turned out to be the winning catch.
A taunting call on Jordon Phillips, the former disgruntled Dolphins defensive lineman who joined the Bills after being released early in the season, aided the Miami drive.
The Bills took over at their 10 with 2:33 to go needing a touchdown. Allen started with a 27-yard completion to Robert Foster over the middle.
A 23-yard throw to Isaiah McKenzie set the Bills up at the Miami 29 with just under two minutes remaining.
The Dolphins benefited from a reversal on replay review of a would-be catch at the Miami 5 by Jones with 54 seconds left. The replay ruled the ball hit the ground with Jones not in control.
That left the Bills facing fourth-and-11 at the 30.
Allen scrambled as he had so often throughout the game. Running to his left he uncorked a difficult heave across the field to his right. It appeared catchable, but Clay couldn’t hold it as he sprawled in the end zone.
The Dolphins led 14-6 at the half on Tannehill touchdown passes to DeVante Parker and Kenyan Drake.
After not scoring on an opening possession all season until last week, they now have put up seven points on their initial drive in two consecutive games.
Tannehill hit Parker for 18 yards on a nifty toss while going down to cap a well-constructed 10-play, 75-yard drive.
The Bills had only allowed seven points on openers all season, tied for best in the NFL. They hadn’t allowed one since Week 1.
But bad field possession and poor line play stunted their next three possessions.
They started inside their own 15 on each of them and didn’t record a first down, with Tannehill under heavy pressure and sacked three times.
They netted minus-11 yards on those nine plays.
The Dolphins hurt themselves with five penalties for 54 yards in the half, most of them by offensive linemen.
That included back-to-back holding calls on guards Ted Larsen and Jesse Davis.
The line was a mess with center Travis Swanson injured an inactive. Jake Brendel moved to center and Larsen, who has struggled mightily, started at left guard.
The Dolphins took advantage of a turnover on special teams to score again late in the half. Senorise Perry recovered muffed punt by Isaiah McKenzie at the Buffalo 36.
They overcame another penalty when Tannehill hit Gore on third-and 7 for a first down at the 9. He finished it with a soft toss to Drake for a 4-yard touchdown with 40 seconds left in the half.