MIAMI GARDENS, Fla. (AP) Thomas Morstead stepped into the middle of Miami's end zone, swung his powerful right leg and booted a punt.

Right into the backside of blocker Trent Sherfield.

Nearly the butt of a bad joke ending, the Dolphins held on for the last laugh against the reigning AFC East champions instead.

Miami overcame what was quickly dubbed the ''butt punt'' by shutting down Josh Allen and the Buffalo Bills twice in the final minutes, improving to 3-0 with a 21-19 victory that ended with Allen desperately trying to spike the football on the edge of field goal range.

''I don't like these shock endings,'' Dolphins coach Mike McDaniel said. ''But I'm just really, really happy for the team because this much I do know: Teams win football games, and if you are going to have success over the long haul, you have to have confidence that whatever phase can win a football game for you, can go ahead and do that.''

Dolphins quarterback Tua Tagovailoa briefly left the game in the second quarter, returning after halftime despite appearing to be disoriented by a head injury - the team clarified later that actually, he had an issue with his back. He finished with 186 yards and a touchdown pass to River Cracraft.

Allen was also scraped up, getting X-rays on his right hand after the game after banging it on a helmet or facemask. He insisted he was fine after.

The Dolphins' defense did just enough to stall Allen twice in the fourth quarter, the first effort a goal-line stand that followed a go-ahead rushing touchdown by Miami's Chase Edmonds.

Allen threw incomplete on fourth down from the 2-yard line, ending a 17-play, eight-minute drive - and seemingly Buffalo's chances for a comeback win.

But then Tagovailoa and the Dolphins went three-and-out, leaving Morstead with little room to kick the ball away.

It wasn't enough space. The kick clanked right off Sherfield and went out the rear of the end zone for a safety - a mishap drawing immediate comparisons to Jets quarterback Mark Sanchez's infamous ''butt fumble'' from 10 years earlier. Sanchez ran into the bottom of lineman Brandon Moore, jarring the ball loose.

''Woah. stay out of my lane bro,'' Sanchez tweeted at Morstead.

Allen had about a minute to guide Buffalo into field goal range, and did so, but the Bills ran out of time. Isaiah McKenzie tried for extra yards on a completion from Allen, costing precious seconds. Dolphins players started celebrating when the clock hit zero with Allen just stepping under center.

Bills offensive coordinator Ken Dorsey slammed his headset and began throwing paper and notebooks in the coaches' box when time ran out.

''It was only fourteen or twelve seconds,'' said Dolphins linebacker Melvin Ingram, who had a fumble recovery in the first half. ''You run around, throw the ball. He runs all the way around, that clock is going to down.''

Miami took the lead with about 10 minutes left in the game, scoring a touchdown to go up 21-17. It was the Bills' first deficit of the season.

Buffalo ran 90 plays compared to 39 for Miami, outgaining the Dolphins 497 yards to 212.

''You should win those games,'' Bills coach Sean McDermott said. ''We just didn't take care of the ball enough and come away with some takeaways.''

On a day in which Allen completed a career-high 42 passes and finished with 400 yards, the Bills finished with their lowest point total since a Week 13 last season. Allen also completed his first 11 passes for the first time in his career. He had touchdown passes to running back Devin Singletary and McKenzie and a fumble in the first half that led to a Dolphins touchdown.

The Bills were without several defensive starters, including starting safety Micah Hyde, who on Saturday went on injured reserve with a neck injury, and cornerback Dane Jackson, who suffered a neck injury against the Titans last week. The Dolphins' 21 points was the most Buffalo has allowed all season.

''We used about everybody we could on the sideline there,'' McDermott said.

In the fourth quarter, Miami's Jaylen Waddle caught a 32-yard pass along the right sideline, then added a 45-yard reception on third-and-22 to set up Edmonds' eventual touchdown run.

TOO HOT TO HANDLE

Several Bills players had trouble adjusting to the South Florida heat. McKenzie, TE Dawson Knox and T Spencer Brown were all listed with heat illnesses. Players went down on the field with cramps at multiple points in the game.

''Breathing was tough sometimes. We had some really, really long drives,'' Allen said.

INJURIES

Bills: WR Jake Kumerow injured his ankle in the first quarter and did not return. ... CB Christian Benford injured his hand.

Dolphins: T Greg Little injured his finger. CB Xavien Howard left in the third quarter with cramping. but returned.

UP NEXT:

Bills: At the Baltimore Ravens next Sunday.

Dolphins: At the Cincinnati Bengals on Thursday.

---

More AP NFL: https://apnews.com/hub/nfl and https://twitter.com/AP-NFL

Copyright 2024 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.