Josh Allen passed for 315 yards and added 59 yards rushing as the Buffalo Bills' top-ranked defense stuffed Patrick Mahomes and the Kansas City Chiefs during a 38-20 win in soggy Kansas City, Missouri, on Sunday.

The victory avenged the Bills' 38-24 loss to the Chiefs in last year's AFC championship game and kept Buffalo (4-1) in charge of the AFC East. Kansas City (2-3) lost its second straight at home and fell into last place in the AFC West.

A line of thunderstorms prompted a 62-minute delay at halftime, and rain persisted in the second half.

Dawson Knox caught three passes for 117 yards with one touchdown, while Emmanuel Sanders had two TD grabs, including an 8-yarder made the score 38-20 margin with 5:51 remaining.

Buffalo's stingy defense provided a TD off a 26-yard interception return by Micah Hyde for a 31-13 third-quarter lead. Greg Rousseau also snagged a pick as the Bills rattled Mahomes, who passed for 272 yards and rushed for 61 but also lost a fumbled snap while going 33 of 54.

Chiefs running back Clyde Edwards-Helaire left in the third quarter with an apparent knee injury after rushing for 13 yards on seven carries.

The Bills overcame 10 penalties for 103 yards.

Allen ran for a 9-yard touchdown and connected with Sanders and Knox for scores of 35 and 53 yards, respectively, as Buffalo gained early control and built a 24-13 lead at halftime.

The TD bomb to Knox, who slipped behind Chiefs defender Dan Sorensen, came with 1:16 left, two plays after Mahomes and Kansas City failed to convert a fourth down on the Bills' 32.

Allen passed for 219 yards and rushed for 41.