KANSAS CITY, Mo. — A magical performance from Patrick Mahomes and Co. led the Kansas City Chiefs to a win in the AFC Divisional Round overtime thriller over the Buffalo Bills 42-36.

Mahomes led the Chiefs in rushing (69 yards) along with throwing for 378 yards and three touchdowns.

Mahomes passed Russell Wilson (2,777) for the most postseason passing yards by a QB in their first 5 seasons in NFL history. Mahomes also set a new franchise single-game record for most rushing yards by a QB in a postseason game.

The Bills were committed to the run all night with Josh Allen running for 68 yards and a touchdown and throwing for 329 yards and four touchdowns.

Tyreek Hill led the receiving with 11 catches for 150 yards.

After being tied at 14 at halftime, the Chiefs scored 9 unanswered (including a Mecole Hardman rushing touchdown) to take a 23-14 lead.

On the next offensive play for Buffalo, Allen hit receiver Gabriel Davis for a 75-yard touchdown to make it 23-21.

Davis finished the game with 201 yards and four touchdowns on eight catches.

After a KC field goal made it 26-21, the Bills used seven minutes and 17 plays to take the lead off and get a two-point conversion to take a 29-26 lead with less than two minutes left.

The Chiefs only needed five plays for Mahomes to hit Hill for a 64-yard touchdown to make it 33-29 with a little over a minute left.

The Bills then used six plays to drive the field and score on a 19-yard touchdown pass to Davis to take a 36-33 lead with 13 seconds left on the clock.

Two long passes to Travis Kelce and Tyreek Hill led the Chiefs to the Bills 31-yard line with four seconds left. Harrison Butker sends the game to overtime with a 49-yard field goal as time expires.

In overtime, the Chiefs won first possession and used eight plays to drive the field and scored on an eight-yard Travis Kelce touchdown.

Kelce finished the game with eight catches, 96 yards and a touchdown.

They will host the Cincinnati Bengals in a rematch of their Week 17 game: the last Chiefs’ loss. They will play at 1 p.m. CT.