The Chiefs will carry a franchise-record 10-game winning streak into the playoffs.
Alex Smith threw two touchdown passes, the Chiefs sacked Raiders quarterback Derek Carr six times and Kansas City held on for a 23-17 victory over Oakland on Sunday.
The Chiefs were awaiting the result of the Denver-San Diego game to learn their playoff fate. If the Broncos win, they'll head to Houston as the fifth seed. If the Chargers win, the Chiefs win the AFC West for the first time since 2010 and will host Pittsburgh in the first round.
Regardless, they're somehow in the playoffs after a 1-5 start.
Even without running back Jamaal Charles, out for the season with a knee injury, and linebacker Justin Houston, sidelined by a bum knee, the Chiefs (11-5) have kept on rolling. They're the only team in NFL history to win 10 straight following a losing streak of five or more games.
The Raiders (7-9) accounted for two of those victories.
In perhaps their final game in Oakland, the Raiders only mustered a field goal on offense until the final minutes, when Carr connected with Michael Crabtree from 31 yards out.
They did get the ball back with 1:34 left, but Carr took one final sack that helped time expire.
Carr threw for 194 yards, leaving him 13 yards short of 4,000 for the season. Latavius Murray, the AFC's rushing leader coming in, carried 11 times for just 31 yards.
The Raiders' other touchdown came on a pick-six by David Amerson late in the first half.
The Chiefs started hot for the third straight game, marching 80 yards for a score on their opening possession. Jeremy Maclin capped it with a 25-yard reception through the middle of the Oakland defense.
After forcing a punt, the Chiefs cobbled together a creative 12-play, 87-yard march that included a jet sweep by Maclin for a first down. Spencer Ware's short touchdown run made it 14-0.
It was still 14-3 when Smith threw interceptions on consecutive passes, though neither of them was to Charles Woodson — the veteran safety playing the final game of his sterling 18-year career.
The first was picked by TJ Carrie late in the second quarter. Then, after Carr was picked off in the end zone by the Chiefs' Ron Parker a few minutes later, Smith tossed another pass that was caught by Amerson and returned 24 yards for a touchdown that got Oakland within 14-10.
Smith had only thrown five interceptions all season, at one point going 312 passes without one.
The Raiders' offense fared no better, though. On their first chance of the second half, Carr was sacked twice and Marquette King had his punt blocked through the end zone for a safety.
Kansas City got the ball back on the free kick and got back in synch on offense. Smith hit Maclin for a long gain on third down, and then hit Demetrius Harris in the end zone. It was the seventh catch of the season for Harris, and the first of the former college basketball player's career.
The Raiders got within 23-17 on Crabtree's touchdown, but their comeback ran out of time.