KANSAS CITY, M.O. (WROC) — Josh Allen and Dawson Knox made the big play on offense. Taron Johnson sealed the game on defense. And the Bills came up with a massive win against their AFC rivals as they defeated the Chiefs 24-20.

Allen threw for three touchdowns, none bigger than his 14-yard touchdown to Knox with just over a minute left in the game to take the lead.

“It was great to get a road against an opponent that’s really good across the board,” said Knox. “Obviously, there were still some bad memories from this place last year. So it’s kind of nice to wipe that off of our minds to get a win and keep moving on.”

On the ensuing drive, Johnson intercepted Patrick Mahomes to end Kansas City’s potential game-winning drive before it could really start.

With the win, the Bills took essentially a 1.5-game lead in the AFC which could have massive playoff implications as to the site of a potential January rematch.

“We’re prepared, we’ve been here before,” said Stefon Diggs, who finished with 148 yards. “We’ve battled through the storm, multiple times- good and bad. Sometimes it didn’t really go our way. So as far as us having that poise and that energy of we got.”

“I tried to stay as even-keel throughout this game, and really, any game I’ve played in my career. Just try and be steady,” said Allen. “Not get too high, not get too low, just trust what was being called and just execute.”

Both quarterbacks shined, with Allen throwing for 329 yards and Mahomes 338, though Mahomes had two costly interceptions.

“I thought we fought through some injuries, some untimely penalties, but the guys were resilient the whole game and came through in the end when we needed it most,” said head coach Sean McDermott.

Despite both teams moving the ball well in the first quarter, neither could muster up any points.

The Bills driver to the Kansas City 13-yard line before Allen seemingly improvised a flip to Isaiah McKenzie. The lateral was dropped and the Chiefs recovered the fumble.

The Chiefs drove down the field and on third and goal, Mahomes scrambled and tossed up a jump ball into the end zone which rookie Kaiir Elam came down with for the interception, his second straight game with a pick.

Buffalo mounted another successful drive but stalled just outside the red zone. A key play was a Gabriel Davis hold bringing back a Devin Singletary 12-yard run which would have put the Bills at the ten-yard line. Tyler Bass converted a 39-yard field goal for the first points of the game.

The Chiefs scored the first touchdown of the game on the ensuing drive as Mahomes connected with JuJu Smith-Schuster for a 42-yard touchdown. Smith-Schuster escaped three would-be tacklers on the reception, and the drive was aided by a defensive holding penalty on third down by Siran Neal on the prior play.

Allen once again went on a long drive, but the Bills failed on fourth and goal as Allen’s pass intended to McKenzie could not be completed. Spencer Brown injured his ankle on the drive. He was later ruled out and was seen in a walking boot on the sideline.

The Bills finally got the jolt they needed just before halftime. Backed up on their own four-yard line with 1:29 remaining in the half, the Bills went on a seven-play, 96-yard drive that ended with a 34-yard touchdown pass to Davis.

Proving that the sports gods have a sense of humor, the Bills left just enough time for Mahomes to drive down the field and set up a field goal as time expired. This time, there were 16 seconds left to start the sequence. The Bills squib-kicked it to take four seconds off the clock. Then Mahomes completed two passes to Jerrick McKinnon and Travis Kelce to set up a 62-yard field goal by Harrison Butker, a Chiefs and Arrowhead Stadium record. That made it 10-10 at the half.

After the Chiefs opened with third quarter with a missed field goal, the Bills re-gained the lead as Allen hooked up with Diggs on a 17-yard touchdown, who beat rookie Joshua Williams in 1-on-1 coverage.

Kansas City once again had an answer as Mahomes and Smith-Schuster connected for a 41-yard gain which set the Chiefs up in Buffalo territory. On third and goal, Mahomes bought extra time and found Mecole Hardman for a three-yard touchdown to tie the game at 17, where it stayed heading into the fourth quarter.

The Bills turned the ball over on downs on their next drive. Singletary was bottled up on third and one, then Allen appeared to want to try a QB draw on fourth down. There was a QB spy for the Chiefs which forced an errant pass by Allen that came up incomplete.

The Chiefs retook the lead on the ensuing drive as the Bills were able to force a field goal, a 44-yarder from Butker to make it 20-17 with 9:49 left in the game.

The Bills punted on the ensuing drive as Allen was sacked by Chris Jones on third done. The referees seemingly missed a trip by Jones which would have extended the drive. The Bills defense answered as Von Miller got a sack on third down to force a punt, his second of the game.

The Bills got the ball back with 5:31 left in the game. The drive started with Allen converting on a 4th and one QB sneak. It ended with Allen hitting Dawson Knox in the end zone for a 24-20 lead with 1:04 left in the game.

Johnson sealed the game with an interception to thwart any chance of a Kansas City comeback on just the second play of the Chiefs’ drive.

The Bills, now at 5-1 and atop the AFC standings, will have the next week off before hosting the Green Bay Packers on Sunday Night Football.