ORCHARD PARK, N.Y. (AP)Baker Mayfield and the Tampa Bay Buccaneers fought back and had an opportunity to win on the final play of the game.

But a slow-starting offense, poor field position, and critical, self-imposed errors were too much to overcome for Tampa Bay (3-4). The Buccaneers dropped their third straight and fourth in five outings with a 24-18 loss to the Buffalo Bills on Thursday night.

“We showed fight tonight,” Mayfield said. “That’s the one thing that we can hang our hats on. We gave it everything we had there at the end. But we have to play better early on. We can’t hurt ourselves in too many situations where we’re trying to move the ball. Those momentum killers were critical tonight.”

Mayfield limped as he walked up the tunnel after greeting Bills quarterback Josh Allen, his 2018 draft classmate at midfield after the game. Mayfield was 25 of 42 passing for 237 yards with two touchdowns and no interceptions. He took three sacks for the second consecutive game, and was hit 10 times by Bills pass rushers.

“I’ll say this, I’m happy we’ve got a long weekend,” Mayfield said.

He would’ve felt much better if the Bucs’ last-quarter comeback had not fallen short.

Trailing 24-10, Mayfield got Tampa Bay to within one score when found his top receiver Mike Evans for a 24-yard touchdown pass on fourth down, and then converted a 2-point pass to tight end Cade Otton with 2:44 remaining, to cap a 17-play drive covering 92 yards.

Getting the ball back with 21 seconds left, Mayfield completed three passes for 20 yards before attempting a Hail Mary from the Bucs 45. His heave reached the end zone, falling right beside receiver Chris Godwin’s right arm, who was late turning around to find the ball.

“We gave ourselves a chance,” Mayfield said. “We were that close. It just shows we are a few plays away. We have the fight. Now we just have the execution.”

Tampa Bay finished with 302 total yards, a small improvement from averaging 277 yards over the previous four games.

Godwin had five catches for 54 yards and scored on a 3-yard touchdown. Evans finished with a season-low 39 yards on three receptions.

Tampa Bay’s fight to the finish resonated with coach Todd Bowles, but he lamented the 11 penalties, which matched a season high and prevented the Bucs offense from finding momentum through the first three quarters.

“My faith in these guys has never wavered,” Bowles said. “I’ll take them anywhere. I’ll take them down an alley. I’ll fight with them any kind of way. I believe in them whole-heartedly. We believe in ourselves as a team. And we know we’ll push forward and get better.”

Eight of the Buccaneers’ penalties came on offense, including four false starts against linemen.

“We moved the ball when we didn’t have the penalties,” Bowles said. “We got started late in the game getting some flow going. But the penalties held us back, and kind of killed the momentum we had.”

The Bucs offense also was hindered by an average drive start at its own 21. Their first touchdown came two plays after Antoine Winfield Jr. tipped a pass that was intercepted by defensive lineman William Gholston at the Bills 23. Four of Tampa Bay’s other nine series started inside its own 10, including three inside the 5.

Tampa Bay’s defense mostly held up despite injuries to both starting defensive tackles. Vita Vea did not play due to a groin injury, while Logan Hall was hampered after hurting his groin during warmups.

The Bills scored just two touchdowns on four drives inside Tampa Bay’s 20, with the other possessions ending with a field goal and turning the ball over on downs. And the defense kept the score close in forcing Buffalo to punt on each of its final four possessions.

After losing two games in five days, the Bucs have extra time to get ready to play at Houston a week from Sunday.

“It won’t snowball,” Bowles said. “We have a lot of leaders in that locker room, a lot of leaders on our coaching staff. We have faith. We understand how tough we play. We just have to play smarter.”

AP NFL: https://apnews.com/hub/nfl