LAS VEGAS (AP) — Patrick Mahomes set the NFL record for total yards in a season, and the Kansas City Chiefs rolled to a 31-13 victory over the Las Vegas Raiders on Saturday to lock up the AFC’s No. 1 seed.

Mahomes passed for 202 yards and rushed for 29 against the Raiders, giving him 5,608 total yards this season. That surpassed the record of 5,562 yards set by Drew Brees in 2011 with the New Orleans Saints.

More than setting the mark, Mahomes helped ensure the top seed for the Chiefs (14-3) and a bye in the first round of the playoffs, which begin next weekend. Kansas City, however, is not assured of home-field advantage throughout the postseason.

Because Monday night’s Buffalo-Cincinnati game was canceled, the Chiefs could wind up playing the Bills or Bengals in the AFC championship on a neutral field. The Buffalo-Cincinnati game initially was postponed after Bills safety Damar Hamlin went into cardiac arrest. Hamlin remains in critical condition, but is improving.

The Chiefs matched their franchise record for regular-season victories, set in 2020, and they set a team mark with their 17th consecutive game of at least 300 yards of offense.

The Raiders (6-11) ended their first season under coach Josh McDaniels with three consecutive losses and four defeats in five games. They made the playoffs a year ago, but now face serious questions at quarterback, offensive line and throughout the defense.

Jarrett Stidham started his second game in a row in place of the sidelined Derek Carr, and this performance didn’t go nearly as well as the first one. Stidham completed 22 of 36 passes for 219 yards with a touchdown and interception. He was sacked six times.

A week ago, he threw for 365 yards and three touchdowns in a 37-34 overtime loss to the San Francisco 49ers.

Raiders running back Josh Jacobs, who was dealing with hip and oblique injuries as well as a reported family emergency, was a game-day decision but played. He rushed for 45 yards and could possibly win the NFL rushing title with 1,653 yards.

But Jacobs fell short of the franchise rushing record of 1,759 yards set by Marcus Allen in 1985. This was potentially Jacobs’ final game as a member of the Raiders because his fifth-year option was not picked up. His performance this season has given Las Vegas officials plenty to consider.