It was a perfect night for the Bills.
Start with the fact that the undefeated Steelers, playing at home, managed to lose to 4-7 Washington, 23-17.
Then, in its own game, Buffalo put a 34-24 hurting on the 49ers at their temporary home, State Farm Stadium in Glendale, Arizona.
The win lifted the Bills to 9-3, two games behind the Steelers (11-1), whom they host Sunday night. And while Kansas City and Pittsburgh are tied for the American Football Conference’s best record and resurgent Cleveland is tied with Buffalo, it can clearly enhance its playoff position and the quality of its first-round postseason foe over the season’s final quarter.
The Bills also tightened their grip on the AFC East lead, ahead of Miami (8-4) and New England (6-6) and with victories over both.
To be sure, Buffalo earning the top seed in the conference is a longshot as the Chiefs have to lose twice more, which is possible with games at Miami and New Orleans while hosting the Falcons and Chargers.
Ditto, Pittsburgh, though Buffalo can inflict one of those Sunday while the rest of the Steelers schedule is games at Cincinnati and Cleveland and home against Indianapolis.
The Browns, besides that game against the Steelers, also host the Ravens while meeting the Jets and Giants on the road.
After hosting Pittsburgh, the Bills travel to Denver and New England before finishing at home against the Dolphins.
— The loss by San Francisco (5-7) pretty much destroyed the 49ers hopes for an NFC wild-card berth.
— This game had an interesting wagering swing. The first posted odds had Buffalo favored by 2½ points but by Monday, the 49ers were a 1½ -point favorite.
— Buffalo quarterback Josh Allen had a franchise first. His numbers — 32-of-40 passing for 375 yards, four touchdowns, no interceptions and a 139.1 passer rating included another interesting stat. It’s the first time in Bills history a QB has completed 80 percent of his passes and thrown for at least four touchdowns. He also set a team record with his third 300-yard, four-touchdown game in one season.
— San Francisco’s lone takeaway came late in the first quarter when Bills’ rookie running back Zack Moss fumbled on first down from Buffalo’s 1-yard line after an inspired goal-line stand. Moss botched the handoff from Allen and Niners linebacker Fred Warner recovered.
He wasn’t known as a fumbler in college and hadn’t for Buffalo until last night. Indeed, Moss also turned the ball loose near the end of the Bills’ first possession, though a review concluded he was down. He wasn’t so fortunate on the second bobble.
— Buffalo’s first takeaway came when safety Micah Hyde intercepted a deflection off the hands 49ers wide receiver Brandon Aiyuk. It was Hyde’s first pick of the season. Then, cornerback Tre-Davious White wrestled an interception away from San Francisco running back Jeff Wilson at the goal line, his team-leading third of the season, all in the last four games.
— San Francisco defensive end Dion Jordan logged the lone sack of Allen, his second this year.
— Wide receiver Cole Beasley caught his fourth touchdown pass of the season. Later rookie wideout Gabriel Davis caught his team-leading fifth TD of the campaign. Also, second-year tight end Dawson Knox caught his fourth touchdown as a Bill, No. 2 this season.
Beasley had nine receptions for a career-high 130 yards. His seven catches for 113 yards at halftime marked the first time a Bills receiver had triple digits in receiving yards by intermission since Sammy Watkins in 2015.
— Buffalo wideout Stefon Diggs had 10 catches for 92 yards and for the third straight season he exceeded 1,000 receiving yards. He now has 90 receptions for 1,037 yards.
— Hyde logged a game high 12 tackles while cornerback Levi Wallace added 10 including a team-high seven solo stops.
Cornerback Jason Verret led the 49ers with 11 tackles, all of them solos, a game-high.
— Inactive for the Bills were quarterback Jake Fromm, defensive end Trent Murphy, tight end Tyler Kroft and running back T.J. Weldon. Buffalo’s key addition was outside linebacker Matt Milano (pectoral) who was activated from injured reserve.
— Among the 49ers inactives were cornerbacks Emmanuel Moseley and D’Waun Williams. Of course they also have 17 players on injured reserve including six starters.
(Chuck Pollock, a Times Herald senior sports columnist, can be reached at cpollock@oleantimesherald.com)