CINCINNATI (AP) Andy Dalton looked over the spread-out Ravens defense and decided there was enough room for a quarterback sneak.
With a push from his linemen, he surged into end zone for a last-minute win.
Surged the Bengals back into first place, too.
Dalton made up for his two fourth-quarter turnovers by scoring on a 1-yard sneak with 57 seconds left on Sunday, rallying Cincinnati to a 27-24 victory over Baltimore that changed the AFC North's pecking order.
After three very bad weeks, the Bengals (4-2-1) were back atop the tightly bunched division.
''That was a cool moment, a cool experience and exactly what we had to have in that situation,'' said Dalton, who scored Cincinnati's first and last touchdowns on 1-yard sneaks.
It was especially satisfying for Dalton, who had a fumble and an interception in the fourth quarter that let an 11-point lead slip away. The Ravens (5-3) took advantage and pulled ahead 24-20 with 3:59 to go.
Dalton pulled it out with a 10-play, 80-yard drive against the NFL's stingiest defense.
''He was like, `We're good, we've got this,''' receiver Mohamed Sanu said.
Dalton threw a 53-yard pass to Sanu on third-and-10 - safety Terrence Brooks got turned around and couldn't make a play on the ball - to get Cincinnati in range.
Dalton was 3 of 5 for 62 yards on the drive, converting a pair of third downs.
On the fourth-down play from just beyond the 1-yard line, Dalton had the option of taking it himself. The Bengals sent three receivers to the right, and he figured the sneak would work. His linemen gave him the final push over the goal line.
''They could have called forward progress stopped, yes they could have,'' Ravens coach John Harbaugh said.
It was the first touchdown that the Ravens had allowed in the final 2 minutes of a game this season. The 24 points were the most they have allowed overall.
The Bengals had to wait out a few scary moments before celebrating.
Joe Flacco eluded the rush and lofted a pass to Steve Smith, who went 80 yards for an apparent touchdown with 32 seconds left. Smith was called for pushing off on George Iloka to get open, nullifying the play.
''That was pass interference two years ago, it was pass interference last year, it's pass interference this year, and it will be pass interference for the next two years,'' Iloka said. ''I knew it right away.''
With that, the Bengals had their first series sweep of the Ravens since 2009. They won the season opener 23-16 in Baltimore on A.J. Green's juggling 77-yard touchdown in the closing minutes.
Green was inactive on Sunday for the third week in a row because of an injured big right toe, hurt in the opener at Baltimore. Sanu filled in and had two big plays while finishing with five catches for a career-high 125 yards.
Sanu also made a one-handed catch for a 48-yard pass play on Cincinnati's game-opening drive, which ended with a 1-yard sneak by Dalton. He was 21 of 28 for 266 yards with an interception, a fumble and two sacks.
Those turnovers helped Baltimore take its first lead. Haloti Ngata forced a fumble by Dalton that Daryl Smith returned to the 8-yard line, and Lorenzo Taliaferro's second touchdown run put the Ravens up 21-20.
C.J. Mosley intercepted Dalton's tipped pass, setting up Justin Tucker's 53-yard field goal with 3:59 to go. Just like in the opener, the Ravens' defense couldn't hold onto a late lead.
Flacco was 17 of 34 for 195 yards with two interceptions and a sack. The Ravens dominated the first half against a struggling defense - Cincinnati had allowed more than 500 yards in two of its past three games - but couldn't get touchdowns out of long drives.
Baltimore had the ball for 18 plays on its first drive, but Flacco's incompletion on fourth down from the 1-yard line made the Ravens come up empty. It was the longest drive without points in franchise history.
Notes: Ravens WR Torrey Smith ran into a cluster of players in the second half and was tested for a concussion, but returned. WR Michael Campanaro pulled a hamstring in the third quarter and didn't return. CB Jimmy Smith left with a foot injury during the Bengals' opening drive. Harbaugh provided no specifics on the injuries. ... Bengals LB Vontaze Burfict left during Baltimore's opening series after hurting his left knee but returned. RG Kevin Zeitler reinjured his right calf, which forced him to miss three games.
AP NFL website: www.pro32.ap.org and www.twitter.com/AP-NFL