The window for reclaiming the A.F.C.’s top seed was closing quickly. Kansas City, which had surrendered its hold on the No. 1 seed with last week’s loss to Cincinnati, trailed the Denver Broncos through three and a half quarters.On second down, deep in Kansas City territory, Broncos running back Melvin Gordon readied himself to take a handoff from quarterback Drew Lock, but Melvin Ingram, whom Kansas City acquired at the November trade deadline, had been eyeing him. Before Gordon could firmly grasp the ball, Ingram had burst into the backfield unblocked and knocked it loose. His teammate, linebacker Nick Bolton, scooped up the ball and darted toward to the end zone with Lock in tow.The 86-yard score and ensuing two-point conversion gave Kansas City the win it needed, 28-24, to possibly reclaim the No. 1 seed, home-field advantage and a first-round bye in the playoffs. For that to happen, the Chiefs would need the Tennessee Titans, who are currently the A.F.C.’s top team, to lose to the Houston Texans on Sunday. If the Titans win, Kansas City (12-5) would drop no lower than the No. 2 seed and would host the No. 7 seed in the first round of the N.F.L. playoffs.In a game that Kansas City needed to win in order to have any chance of improving its seeding, it took overcoming self-inflicted mishaps to get past a Broncos (7-10) team that had little to play for beyond trying to snap a 12-game head-to-head losing streak that stretched back to November 2015. Denver had already been eliminated from playoff contention and played without starting cornerbacks Pat Surtain II and Ronald Darby against one of the N.F.L.’s most potent passing offenses.But Denver built a startling lead early on Saturday behind the backup Lock, who was 12 for 24 with 162 yards. The quarterback had two rushing touchdown in the first half, including one on a third-down play in which none of Kansas City’s defenders accounted for him as a runner, and he danced into the end zone relatively untouched to put the Broncos ahead, 14-7.Kansas City’s rehabilitated defense had seemed to revert to early-season form at the worst possible time. Gordon gashed the Kansas City defense for 110 yards, including a score in the third quarter. On the play, Gordon took a handoff from Lock and skirted between Kansas City defenders on a 47-yard scamper into the end zone to put the Broncos up, 21-17.But Kansas City has ridden the ebbs and flows of this inconsistent season, and did so again in this final regular season game, leaning on its offense to push the ball down the field when it absolutely needed to score, despite injuries to many of the team’s skill position players.Tyreek Hill, Kansas City’s electric receiver, was in and out of the game with a right heel injury. Running back Clyde Edwards-Helaire sat out with a shoulder injury.Mahomes’s first touchdown pass of the game was a short throw to tight end Travis Kelce on Kansas City’s opening drive. The team’s second touchdown score came on a physical 14-yard rush by running back Jerick McKinnon.But in a game marred by missed tackles and breakdowns in its defensive front and in the secondary, Ingram’s big play and Bolton’s return secured the win and kept Kansas City’s hopes of clinching the A.F.C.’s top seed alive.