ORCHARD PARK, N.Y. — No stranger to criticism, Bengals quarterback Andy Dalton was able to offer Mike Nugent some advice once it became apparent how costly the kicker’s missed field goal was.
‘‘I told him, ‘You’re going to kick a field goal to win the game,’ ’’ Dalton said when the Buffalo Bills scored to force overtime. ‘‘Just be ready.’’
Nugent delivered, hitting a 43-yarder with 6:44 left in overtime to seal a 27-24 win over Buffalo on Sunday. Nugent rediscovered his aim after missing a 34-yard attempt wide right that would have put the Bengals up, 27-10, late in the third quarter.
And Dalton showed an ability to bounce back as well. Ending a two-game touchdown drought, Dalton silenced his doubters by going 26 of 40 for 337 yards and three touchdowns.
‘‘It shows what we can do on offense,’’ Dalton said. ‘‘Hopefully, there will be some positive stuff written about us.’’
The three touchdowns — an 18-yarder to A.J. Green, a 20-yard shovel pass to Giovani Bernard, and a 10-yarder to Marvin Jones — matched Dalton’s career best for a road game. And his 337 yards passing were the third most of his career.
Nugent was relieved to have a second chance, too.
‘‘I feel like I put us in overtime in a bad way, obviously,’’ Nugent said. ‘‘I just hit it terrible. I think I was lucky that we could get back in a position to win.’’
After Cincinnati (4-2) was stopped at Buffalo’s 37 in overtime, punter Kevin Huber pinned the Bills inside their 7 and the Bengals forced a three and out from Buffalo.
Brandon Tate set up Nugent’s winning field goal by returning a punt 29 yards before being pushed out of bounds at the Bills’ 33. It was another critical breakdown for the Bills, who entered the week with the league’s second-most punt return yards allowed.
The Bills (2-4) lost despite a gutty outing from quarterback Thad Lewis, who started in place of injured rookie EJ Manuel. Lewis, a fourth-year pro out of Duke, went 19 of 32 for 216 yards and two touchdowns in only his second career start. He was promoted from the practice squad last week.
‘‘I think I did OK. But it’s never good when you don’t come out with that W,’’ Lewis said.
Lewis, who also scored on a 3-yard run, showed no signs of wavering after he lost a fumble to open the third quarter that led to Jones’s touchdown. Lewis sustained a sprained foot, but expects to play next week at Miami.
If he can't, the Bills would have to turn to another practice squad player, Dennis Dixon, who was signed Tuesday. Buffalo has only one other quarterback on its roster, undrafted rookie Jeff Tuel.
The young and rebuilding Bills have remained competitive. Their four losses have been decided by a combined 25 points.
Lewis produced a near-stunning comeback in rallying the Bills from a 14-point, fourth-quarter deficit.
The comeback began five minutes into the fourth, when Lewis found tight end Scott Chandler for a 22-yard touchdown pass on fourth and 8. His next touchdown pass was equally impressive. After hitting Chandler for a 25-yard gain over the middle, Lewis connected with Marquise Goodwin on a 40-yard score with 1:08 remaining.
It was an unlikely performance by a relative unknown at quarterback against a defense that ended Tom Brady’s consecutive-game touchdown streak at 52 last weekend.
In its three previous wins this season, Cincinnati’s defense limited the Patriots’ Brady, Green Bay’s Aaron Rodgers, and Pittsburgh’s Ben Roethlisberger to a combined 64 of 118 for 692 yards, with two TDs and four interceptions.
‘‘It ain’t always pretty, but I’ll take a win any day of the week,’’ cornerback Terence Newman said.