KANSAS CITY, Mo. (AP)The Jacksonville Jaguars could not have imagined a better situation than the one they faced late in the first half of their divisional-round playoff game against the mighty Kansas City Chiefs on Saturday.

The upstart AFC South champions, who had to rally from a 27-point deficit against the Chargers last week just to make it into Arrowhead Stadium, found themselves within 10-7 in a hostile environment – and with Patrick Mahomes, a contender for league MVP, hobbling up the tunnel to the Kansas City locker room.

Then they kept squandering chances – their stingy defense giving up too many points, their offense turning the ball over too many times – to finish off the upset.

Kansas City eventually held on for a 27-20 victory on a cold, snowy night, sending the Jaguars into the offseason after an impressive run that few outside Jacksonville expected.

”You put so much into it. You dedicate everything you have for six months to get these opportunities. To come up short, it stings,” Jaguars quarterback Trevor Lawrence said.

”We’ll be back. I’m confident of that. This is more the beginning than the end of something. This is just getting started for us.”

Still, it’s hard for Jacksonville not to wonder what might have been.

The trouble began after Mahomes left with an ankle injury early in the second quarter. One of the league’s best defenses promptly allowed 37-year-old journeyman Chad Henne to lead the Chiefs on a 12-play, 98-yard touchdown drive, putting the Jaguars in a 17-7 hole in the waning minutes of the first half.

”That was a turning point in the game,” Jaguars coach Doug Pederson said. ”We had them at the 2-yard line and we let them off the hook. But those are opportunities where we need to be better.”

Then, once Mahomes returned from the second-half locker room, their defense failed to get much pressure on the suddenly immobile quarterback.

And with time in the pocket to look downfield, Mahomes shredded Jacksonville on a 75-yard scoring drive in the fourth quarter that made it 27-17 with just over 7 minutes left in the game.

Their defense having failed them, the Jaguars turned to their offense to mount another comeback.

That let them down, too.

Lawrence, whose responded to four interceptions against the Chargers by throwing four touchdown passes in their 31-30 comeback win, gamely drove Jacksonville downfield in the fourth quarter. But after completing a pass to Jamal Agnew, who had hurt the Chiefs on special teams, the wide receiver had the ball popped loose for a turnover.

The Jaguars defense quickly forced a punt, but Lawrence was almost immediately picked off by rookie cornerback Jaylen Watson, whose leaping, one-handed interception occurred right in front of the Jacksonville sideline.

”We had some protection issues,” Pederson said, ”and the guy made a heck of a play.”

The Jaguars eventually got a field goal from Riley Patterson with 25 seconds to go, giving them a chance to try an onside kick. But the Chiefs, whose special teams have been a mess most of the season, pounced on it to put the game away.

Travis Etienne ran for 62 yards and a score, and the Jaguars averaged better than 7 1/2 yards per carry. But they were unable to keep drives going, and Lawrence finished with just 217 yards passing with a touchdown and an interception.

”I don’t really have the words right now. It’s equal parts crushed that we’re done playing and proud of what we did. It’s hard to feel that part right now,” Lawrence said. ”The Chiefs did more today than we did. We didn’t quite make those plays at the end that we’ve been able to make the last month or two.”

It was a disappointing ending to what had become a dream run by the Jaguars, who matched a Super Bowl-era record by winning eight games as underdogs and engineering the third-largest playoff comeback in NFL history.

In doing so, they became the first team to win a playoff game after having the worst record the previous season.

All of which portends good things for the Jaguars under Pederson – the longtime disciple of Chiefs counterpart Andy Reid, who delivered a Super Bowl championship to Philadelphia but will have to wait to do the same for Jacksonville.

”I will tell you, I think Doug has done a phenomenal job,” Reid said. ”Their team is better than when we played them (in November). The sky is the limit for them. They’re young. They believe in what they’re being taught and they play hard.”

AP NFL: https://apnews.com/hub/nfl and https://twitter.com/AP-NFL