MIAMI GARDENS, Fla. (AP) A laugher became a thriller for the Miami Dolphins, and they needed overtime to beat the Cincinnati Bengals.

Miami gave up 16 points in the final 29 seconds of regulation but regrouped, and Jason Sanders kicked a 37-yard field goal as time expired for a 38-35 win Sunday.

Andy Dalton threw for 396 yards and four touchdown passes, including three in the final 5:01 of regulation as Cincinnati rallied from a 35-12 deficit.

''There was no way it was going to happen,'' Miami quarterback Ryan Fitzpatrick said. ''And then all of a sudden it became disbelief because it did happen. That's a wild, crazy finish; I've probably never seen one like that. It was nice for us to step up at the end.''

Fitzpatrick threw for 419 yards and four scores, including one to rookie defensive tackle Christian Wilkins. Each team punted twice to start the extra period before Fitzpatrick led a 10-play, 51-yard march for the winning field goal.

''That,'' Cincinnati coach Zac Taylor said, ''is the full range of emotions.''

Despite the gallant comeback, the Bengals (1-14) settled for clinching next year's No. 1 draft pick. They're assured of at least tying for the worst record in club history; they went 2-14 in 2002.

The Dolphins (4-11) again hurt their chances of landing a franchise quarterback in next year's draft, but rookie coach Brian Flores has repeatedly said he's all-out to win now. Rebuilding Miami has four victories in the past eight games with a ragtag roster.

''It's important to win,'' Flores said. ''It's important to me. I love coaching this team. They work extremely hard, and I want them to have success.''

COMEBACK

The stadium was mostly empty when the Bengals cut the deficit to 35-27 with 29 seconds left on Dalton's TD pass and 2-point conversion throw.

Then they recovered an onside kick and reached the 25 with four seconds left. Miami dropped eight defenders back to the goal line, but Tyler Eifert reached above two of them in the end zone to catch Dalton's throw.

On the 2-point conversion, Dalton couldn't find an open receiver and scrambled to tie the score, sparking the sort of celebration that has been a rarity for Cincinnati this season.

SURPRISE TARGET

Wilkins scored his first NFL touchdown even though he earned no style points. He lined up at fullback, made his first career reception at the 1, fumbled and recovered in the end zone.

Wilkins joined William ''The Refrigerator'' Perry as the only rookie defensive linemen with a touchdown reception in the Super Bowl era.

''I just want to say that I'm the best receiver in the league right now,'' Wilkins said with a grin. ''I'm one for one.''

MIAMI'S PASSING

Fitzpatrick also threw touchdown passes of 31 and 13 yards to Mike Gesicki, and 7 yards to DeVante Parker. It was Fitzpatrick's 11th four-TD game - more than John Elway, Tony Romo or Matt Ryan, among others.

Parker had five catches for 111 yards. He made a 51-yard basket catch on a flea flicker to surpass the 1,000-yard mark for the first time in his five-year career.

HALFTIME CEREMONY

The Dolphins' 1972 perfect season team was honored at halftime. Players toasted their achievement with champagne, and coach Don Shula grinned as the crowd sang happy birthday to him. He turns 90 on Jan. 4.

NOTEWORTHY

Randy Bullock kicked a 57-yard field goal, a Bengals regular season record. ... The Dolphins' wild home finale drew a crowd of perhaps only 35,000.

INJURY REPORT

Bengals: CB William Jackson departed with a right shoulder injury. CB Tony McRae was sidelined by a concussion and cervical strain. WR Stanley Morgan was shaken up and went to the locker room in the closing seconds.

Dolphins: CB Jomal Wiltz left the game in the first half with a shoulder injury. WR Allen Hurns left with a shoulder injury. LB Vince Biegel departed in the fourth quarter with an elbow injury. RB Myles Gaskin hurt his left ankle in the closing minutes.

UP NEXT

DOLPHINS: They close the season at New England, where they last won in 2008. The Patriots won 43-0 when the teams met in Week 2.

BENGALS: They finish at home Sunday against Cleveland, which won 27-19 when the teams met two weeks ago. The Browns have won three in a row in the series.

---

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

---

Follow Steven Wine on Twitter: http://twitter.com/Steve-Wine.

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