MIAMI -- The Miami Dolphins snapped a four-game losing streak, beating the Cincinnati Bengals 22-20 on Thursday night in overtime at Sun Life Stadium.
Cameron Wake sacked Andy Dalton for a safety with 6:38 left in the extra period for the winning points. The Dolphins improved to 4-4.
It was the third game in NFL history to be decided in overtime by a safety.
The Bengals (6-3) had their four-game winning streak stopped.
With 7:37 left in the third quarter, Miami got a huge play from cornerback Brent Grimes, who intercepted an Andy Dalton sideline pass and raced 94 yards for a touchdown, giving the Dolphins a 17-3 lead.
It was Grimes' first career touchdown and the fourth-longest interception return in Dolphins history.
Earlier on the Bengals' drive, Dalton had thrown a 50-yard TD pass to Marvin Jones, but it was called back because of a holding penalty on tight end Jermaine Gresham.
Cincinnati got back in the game at 17-10 on a 12-play, 80-yard third-quarter drive that was capped by Gio Bernard's 3-yard TD run. All but 18 yards on the drive were on the ground.
The Bengals tied the score at 17 on a spectacular 35-yard run by Gio Bernard, a hometown hero who played high school ball at nearby St. Thomas Aquinas in Fort Lauderdale.
Bernard started to his right and was seemingly trapped for a 5-yard loss by Grimes and Olivier Vernon. But he broke those tackles, ran to his left and then all the way back to the right before somersaulting into the end zone.
Bernard later left the game with a rib injury.
The game went to overtime after the teams traded field goals in the final two minutes. Cincinnati's Mike Nugent connected from 54 yards with 1:29 left and Miami's Caleb Sturgis was good from 44 yards with 16 seconds remaining.
The Dolphins had the first scoring opportunity, which came when Wake beat Bengals right tackle Andre Smith for a strip sack on Dalton.
Wake recovered the fumble at the Bengals' 25-yard line, but the Dolphins failed to get a first down and Sturgis missed a 34-yard field goal attempt wide left.
The Bengals scored on their next possession, getting a 31-yard field goal by Nugent with 11:56 left in the half. That capped a 14-play, 63-yard drive that might have continued if not for a third-down sack by Wake.
Miami made another big mistake when Lamar Miller broke free for a 41-yard run before he was stripped from behind by a diving Carlos Dunlap. The Bengals' Adam Jones recovered in the end zone and returned it 43 yards.
The Dolphins, though, went up 7-3 with 2:39 left in the half on a 1-yard QB sneak by Ryan Tannehill. That capped a 10-play, 93-yard drive highlighted by a 40-yard completion to Mike Wallace.
Miami took a 10-3 lead into halftime on a 36-yard field goal by Sturgis with six seconds left. The field goal was set up by Dimitri Patterson's interception at the Cincinnati 39.
NOTES: Dolphins G Richie Incognito (neck) left the game in the second quarter and did not return. One play later, Bengals DT Geno Atkins (knee) limped off the field and did not return. ... Dolphins DB Nolan Carroll (concussion) was injured in the second quarter and did not return. ... Bengals LB James Harrison suffered a thumb injury. Dolphins OT Jonathan Martin was on the active list after he left the team on Monday, reportedly after he was pranked by teammates. ... The Bengals were without five injured players who were placed on the inactive list: LBs Rey Maualuga (concussion, knee) and Michael Boley (hamstring), DL Devon Still (elbow), RB Rex Burkhead (hamstring) and OT Andrew Whitworth (knee). ... Next for the Bengals is a Nov. 10 AFC North game at the 3-4 Baltimore Ravens. ... Next for the Dolphins is a Nov. 11 in-state game at the 0-7 Tampa Bay Buccaneers.