It is possible to exaggerate how much was at stake when the Patriots got the ball back at their own 27-yard line on Sunday, down 26-21 to the Bills with 4:27 left. But not by much. Josh Allen had just authored one of his regular acts of vandalism — five plays, 80 yards, a shade over two minutes, capped by a 34-yard touchdown dart to Keon Coleman — and the crowd at brand-new Highmark Stadium was behaving like people who had seen this ending before, because they had. Lose, and New England fell to 1-3, three games behind an unbeaten archrival barely a month into the season.

The other reason the ending felt prewritten was the quarterback on the other side. Drake Maye opened his third season by throwing three fourth-quarter interceptions in a loss to Seattle, and arrived in Buffalo at 1-2, fresh off a 35-6 humiliation in Jacksonville. This was disorienting because Maye’s 2025 had been the outlier of outliers: 31 touchdown passes against eight interceptions, a Super Bowl trip, an MVP runner-up finish. Historically, quarterback development is not like that. Peyton Manning, Troy Aikman and Terry Bradshaw were overwhelmed as young starters. Brett Favre and Steve Young got traded. Roger Staubach once shared the job with Craig Morton. Kurt Warner stocked shelves. Maye’s problem was less his floor than that New England’s patience with quarterbacks was permanently skewed by the two-decade Tom Brady experience.

Anyway. What happened was eight plays, 73 yards, and a season rescued. The drive’s second-biggest play was a 19-yard Maye completion over the middle to Efton Chism, who absorbed a hit and nearly got flipped in midair. The biggest came on third and 5 from the Buffalo 23 with just under two minutes left: Maye rolled right and lofted a pass to the right corner of the end zone — precisely the kind of throw that has betrayed him this year — and Chism hauled it in one-handed for a 23-yard touchdown. A 2-point conversion toss to Rhamondre Stevenson made it 29-26. Chism, a second-year receiver, entered the game with two career catches this season for minus-1 yard, which makes him either the least qualified hero imaginable or, in the Globe’s phrase, the new climber of the Wide Receiver Trust Tree. His quarterback’s verdict was simpler: “I’ve got full trust in myself… There are a lot of guys in that locker room that love each other and love playing for coach Vrabes.”

Buffalo still had roughly 110 seconds and three timeouts, which for Allen is an eternity. Instead, second-year safety Craig Woodson high-pointed an Allen moonball at the Patriots 19 with a little over a minute left — his first interception of the season, and some redemption, given that Woodson had been the nearest defender on Coleman’s go-ahead touchdown minutes earlier after missing the Jacksonville game. Ballgame, effectively: a 29-26 win few outside the New England locker room saw coming.

Maye’s final line — 22 of 37 for 269 yards, three touchdowns, one interception, plus 54 rushing yards — flatters a game that also contained the mistake that nearly sank them. With 16 seconds left in the first half he threw low to Romeo Doubs; the ball deflected into the hands of Buffalo’s Dee Alford, who returned it 37 yards to the Patriots 9, and Tyler Bass kicked a 27-yard field goal for a 17-14 halftime lead. It would have been worse if center Jared Wilson hadn’t run Alford down. There was also a first-half fumble on a sack. The ups and downs, as the Globe’s Chad Finn noted, are the point: quarterback performance within a game is not linear either.

The rest of the offense earned its keep without A.J. Brown and, after a mid-game calf injury, without Mack Hollins. New England opened with a 12-play, 97-yard touchdown drive — Maye went 6 of 7 on it — and its 14 first-half points were its best first half of the season. Doubs caught a team-high six passes on nine targets for 58 yards and two touchdowns, both capping marathon drives, including a 2-yarder that made it 21-17 midway through the third quarter. Asked about waiting for Chism’s catch to be confirmed, Doubs offered the quote of the day: “I’m kind of like the nervous mom sending their kid off to school for the first time.” Hunter Henry added five catches for 62 yards, including the 12-yard first-down grab in the final minute that brought one last groan from the home crowd.

The defense deserves equal billing, because it did this without Christian Gonzalez and Christian Barmore, and then lost cornerback Charles Woods to a shoulder injury. Dalton Kincaid entered as the NFL’s leading tight end — 263 yards, more than 18 per catch — and left with one catch for seven. James Cook was anonymous through three quarters. Allen rushed for four yards, went 2 for 4 in the red zone, and ended the game with the interception. This against a unit that let Jacksonville go 5 for 5 in the red zone a week earlier. The coaches, after a week in which the Jacksonville debacle was laid at their feet, got straight A’s from the Globe’s Ben Volin — including for twice going for it on fourth down, both conversions producing touchdowns. “If you play Josh Allen, you’re going to have to be aggressive,” Mike Vrabel said. “And our guys rewarded us by converting.” (Vrabel also drew an unsportsmanlike conduct flag, admitting afterward that he cursed at an official.)

The arithmetic is modest: the Patriots are 2-2, the Bills 3-1, with three months left. “It gets us back in the race,” Vrabel said. “We’re lucky to get out of here with a win, but it does get us back in the race.” The non-arithmetic was louder. After a rough year that began with getting crushed in the Super Bowl and included the Dianna Russini episode that dinged Vrabel’s leadership, players bear-hugged their coach in the locker room while some chanted, “We ain’t dead!” “Nobody blinked when we were over there on the sideline and they scored and went up, 26-21,” Maye said. “Coach always says, ‘Don’t ride the roller coaster.’” Rhamondre Stevenson’s summary was blunter: “It just gives us some confidence to show us we could do this. We can play with anybody.”

So the season, which was in hospice at 4:27 p.m. Buffalo time, is alive again at 5-something. Four games in, the Patriots have already had a funeral and a resurrection, which is efficient scheduling if nothing else. The roller coaster, per team policy, will not be ridden. It will, however, keep running.