ORCHARD PARK, N.Y. (WROC) — An incomplete Baker Mayfield Hail Mary attempt on the final play allowed the Bills to escape with a 24-18 win Thursday night.

After scoring just ten first-half points in the last three games combined, the Bills offense used tempo and no-huddle to notch 17 points in the first 30 minutes of play. A promising first drive from Buffalo stalled in the red zone where Tyler Bass nailed a 37-yard field goal to give them an early 3-0 lead.

Early in the second quarter, Josh Allen used his legs to scramble for a 13-yard touchdown to push the lead to 10-0. On the ensuing possession, Tampa Bay’s Chase McLaughlin hit a 57-yard field to get the Buccaneers on the board.

On the very next play from scrimmage, Allen was intercepted by William Gholston after Antoine Winfield tipped the ball near the line of scrimmage. A few plays later, Baker Mayfield connected with Chris Godwin on a 3-yard touchdown to tie the game at 10.

The Bills got the ball back and once again drove down the field. Facing 3rd and 12 in the red zone, Allen scrambled to this right and hit Dalton Kincaid for a 22-yard pass for a touchdown giving Buffalo a 17-10 lead into halftime.

On the first possession after the break, the Bills added more points on the board after Allen hit a wide-open Gabe Davis in the end zone for a 4-yard score. The score remained 24-10 until late in the fourth quarter when Mayfield hit Mike Evans for a 24-yard touchdown. Tampa Bay converted a two-point conversion to cut the lead to 24-18.

The Bills offense could not run the clock out and punted the ball back to Tampa Bay with 21 seconds remaining. The Buccaneers had a chance to score as time expired, but Mayfield’s Hail Mary attempt fell incomplete.

Allen completed 31 of his 40 pass attempts for 324 passing yards to go along with 41 rushing yards. James Cook added 67 yards on the ground on 14 carries.

Khalil Shakir led all receivers with 92 receiving yards on six catches while Kincaid finished with five catches and 65 yards. Gabe Davis had a career-high nine catches for 87 receiving yards. Diggs had 70 receiving yards on nine catches as well.

Terrel Bernard and Jordan Poyer led the Bills defense with eight tackles a piece. Bills punter Sam Martin also had a stellar game pinning Tampa Bay inside the 20-yard line three separate times.

Next up for the Bills (5-3) is a date with the Cincinnati Bengals at Paycor Stadium on Sunday, November 5th.