Updated

Miami, FL (SportsNetwork.com) - Cameron Wake sacked Andy Dalton in the end zone for a safety with 6:38 left in overtime, giving the Miami Dolphins a wild and much-needed 22-20 win over the Cincinnati Bengals at Sun Life Stadium.

Wake's third sack of the night ended a four-game losing streak for Miami (4-4) that very nearly reached five after a pair of Giovani Bernard second-half rushing touchdowns and Mike Nugent's 54-yard field goal turned a 14-point deficit into a 20-17 Cincinnati lead with 1:24 remaining in regulation.

"Our backs were up against the wall for a couple weeks in a row and we kept getting pushed back and finally we got out of that hole a little bit tonight," said Miami quarterback Ryan Tannehill. "It was a huge win for us."

The Dolphins' special teams came through down the stretch, though, with Caleb Sturgis drilling a game-tying 44-yard field goal with 11 seconds to go in the fourth quarter and Brandon Fields setting up Wake's final sack by pinning the Bengals deep in their own end with a 32-yard pooch punt.

Miami's defense aided the cause as well by intercepting Andy Dalton three times, one of which was returned 92 yards for a touchdown by Brent Grimes.

Dalton, named the AFC's Offensive Player of Month for October earlier in the day, finished with 338 yards on a 32-of-53 completion rate but failed to throw for a touchdown five days after putting up five in a 49-9 rout of the New York Jets.

The Dolphins, on the other hand, got a turnover-free performance from Tannehill and a 16-carry, 105-yard effort out of Lamar Miller. Tannehill had a 1-yard touchdown run while going an efficient 20-of-28 for 208 yards through the air.

Cincinnati (6-3) had a four-game win streak snapped despite a career-best 11 catches by A.J. Green totaling 128 yards.

"We turned the ball over and didn't make enough plays to win the game," said Dalton. "This is a tough one. We've been winning these games the last several weeks."

Miami appeared headed towards another defeat after Nugent split the uprights with room to spare on his long kick and Tannehill was sacked on the first play of the ensuing drive. The young quarterback hit on his next four attempts, however, including a 21-yard strike to Brian Hartline that put Sturgis in range for a game-tying chance. The rookie kicker, who had misfired on a 34- yard try earlier, calmly delivered to send the contest into extra time.

A 38-yard pass interference penalty on Terence Newman on Miami's opening play of their second possession of OT enabled the Dolphins to cross midfield, but Daniel Thomas was stuffed for a loss on a 3rd-and-1 run from the Bengals' 39 to bring on Fields, whose punt was downed at the Cincinnati eight.

Dalton threw a pair of in completions before Wake burst through the line on a stunt and took down the Bengals' signal-caller a half-yard deep in the end zone for an unusual ending to the Halloween night matchup.

"It's almost like a movie moment," said Wake of the play. "Right before the play, everybody���s looking in each other's eyes and saying 'listen, we need a play right here'."

Cincinnati was in a 17-3 hole midway through the third quarter when Grimes picked off Dalton's off-target pass after the Bengals had gotten down to the Miami 10 and raced untouched the other way. The AFC North leaders quickly rebounded, however, putting forth a 12-play, 80-yard sequence against a tired Dolphins' defense and pulling within seven points on Bernard's 3-yard run with 2:14 left in the period.

After forcing a swift three-and-out from Miami, the Bengals needed just four plays to draw even,

A 14-yard run from BenJarvus Green-Ellis and Jermaine Gresham's 16-yard catch quickly brought the ball to the Dolphins' 35. Bernard then took a pitch to the right, broke a tackle behind the line, reversed course and found daylight for a highlight-reel touchdown that forged a 17-17 deadlock just over two minutes into the fourth quarter.

"We really fought our butts back into the game in the second half," said Bengals head coach Marvin Lewis. "We just weren't able to finish it out and reap the reward of it."

Neither offense accomplished much until after the two-minute warning, when Dalton found Mohamed Sanu for a 16-yard gain on 3rd-and-7 to set the stage for Nugent's 54-yard boot.

Cincinnati's offense also struggled for much of the game's early stages, generating only one sustained drive -- a 14-play, 63-yard march that featured a pair of catches by Green on 3rd-and-10 which moved the chains -- over the course of a frustrating first half. The Dolphins stiffened in the red zone, however, and the Bengals settled for Nugent's 31-yard field goal and a 3-0 edge early in the second quarter.

It was all Miami over the remainder of the period. The Dolphins went in front by churning out 93 yards on 11 plays, highlighted by a 40-yard catch-and-run by Mike Wallace deep into Cincinnati territory and capped by Tannehill's 1- yard sneak across the goal line 2:39 prior to the intermission.

Dmitri Patterson later outmuscled Green on a jump ball to give Miami back the ball at the Bengals' 39 with 28 seconds left in the half, and Wallace's 15- yard grab on the next play set up a Sturgis 36-yard field goal that sent the Dolphins into the break up 10-3.

The margin could have been greater if not for a pair of missed opportunities on Miami's part. Sturgis pulled a 34-yard try wide left in the opening quarter after Wake stripped Dalton at the Bengals' 25, while Cincinnati's Carlos Dunlap knocked the ball loose from Miller at the end of a 41-yard run to the opposing 11-yard line on Miami's subsequent series.

Cincinnati's mistakes, meanwhile, carried over into the second half. Marvin Jones had a 50-yard touchdown catch called back on a downfield holding penalty by Gresham on the initial drive of the third quarter, and the 15-play sequence eventually came up empty when Grimes produced his momentum-shifting interception.

Game Notes

Bernard had 79 yards on just nine carries before exiting with a rib injury late in the fourth quarter, while Bengals All-Pro defensive tackle Geno Atkins did not return after hurting his right knee in the second quarter ... Guard Richie Incognito (neck), Patterson (undisclosed) and cornerback Nolan Carroll (concussion) all left the game for Miami ... Green eclipsed 100 receiving yards for a fourth straight game, tying Carl Pickens' club record set in 1994 ... Miami rushed for 142 yards in the first half, its highest total since 2002 ... Dolphins defensive coordinator Kevin Coyle served 11 seasons as the Bengals' defensive backs coach from 2001-11 before joining Miami's staff ... Miami improved to 6-0 all-time on Halloween, including a 22-14 road decision over the Bengals in 2010.