The Jaguars toppled the Steelers to advance to the AFC title game. (Rob Carr/Getty Images)

PITTSBURGH — It was inevitable, it had seemed, that the AFC’s spot in the Super Bowl would be determined by a rematch next weekend between the Pittsburgh Steelers and New England Patriots. They met in last season’s AFC championship game. When they played last month in Pittsburgh, the No. 1 seed in the playoffs and home-field advantage for their expected return engagement appeared at stake. There was talk in the Steelers’ locker room that day that they’d see the Patriots again this season with the stakes raised.

The problem was, no one got the Jacksonville Jaguars on board with that plan.

The upstart Jaguars crashed the party of the AFC championship game with an impressive performance Sunday that resulted in their second victory of the season at Heinz Field. The Jaguars used three rushing touchdowns by rookie tailback Leonard Fournette and some clutch throws by much-maligned quarterback Blake Bortles to beat the Steelers, 45-42, in a compelling conference semifinal that seemed to leave all of Pittsburgh in stunned disbelief.

It matched the most points ever scored against the Steelers in a postseason game. It will be the third-seeded Jaguars, not the second-seeded Steelers, who will be in Foxborough, Mass., to face the top-seeded Patriots next Sunday in the AFC championship game. The Jaguars, in the season after they went 3-13, are one win from their first Super Bowl appearance. They lost in their two previous appearances in the AFC championship game, both with Tom Coughlin — now their front office football czar — as their coach, in the 1996 and 1999 seasons.

“Blake Bortles, Fournette, our offensive line, they controlled the game,” Jaguars defensive end Calais Campbell said. “That was huge. It’s inspiring. Those guys, when they play like that, nobody can beat us.”

The Jaguars will face a Patriots dynasty appearing in its seventh straight AFC championship game. But the Patriots must be wary. If they underestimate the defense, running game and toughness of these Jaguars, they could meet the same on-field fate as the Steelers did Sunday.

Jacksonville got a pair of first-quarter touchdowns by Fournette and a second-quarter touchdown by its defense. The Jaguars had first-half leads of 21-0 and 28-7. The Steelers clawed back into the game behind the passing of quarterback Ben Roethlisberger. He threw for 469 yards and five touchdowns, two of them to wide receiver Antonio Brown.

But it wasn’t enough. After the Steelers pulled to within 42-35 on running back Le’Veon Bell’s touchdown run, via a lateral from Roethlisberger, with just more than two minutes remaining, a Steelers’ onside kick failed and the Jaguars sealed the outcome with kicker Josh Lambo’s 45-yard field goal.

Now the Steelers head into an offseason of uncertainty, while the Jaguars move on. Roethlisberger contemplated retirement after last season. There was room to wonder in the immediate aftermath of this defeat whether he’d played his final NFL game even after he said Sunday he was looking forward to next season.

“We didn’t get it done,” Steelers Coach Mike Tomlin said. “We didn’t play well enough today. We didn’t coach well enough today. The effort was there. The resolve was there. But just not enough detail, execution to win versus good people in January football. And that’s about the only way to cut it.”

The Jaguars won, 30-9, in an early-October game in Pittsburgh in which Roethlisberger threw five interceptions — two of which were returned for touchdowns by Jacksonville — and then wondered aloud afterward if he still had it any longer.

By the time the Jaguars were done racing to their 28-7 lead Sunday, they had three defensive touchdowns against the Steelers on this field this season and had outscored Pittsburgh, 58-16, to that point in the two meetings.

Campbell and other Jaguars players pointed to comments made by the Steelers, including a Twitter remark by Bell hinting at a rematch with the Patriots next weekend. But Tomlin said his team had not been looking past the Jaguars.

“This team whacked us good in October,” Tomlin said. “Are you kidding me? We realized this was a good football team. They played better than we did today.”

Roethlisberger expressed similar sentiments, saying; “I don’t think so. Everybody I talked to, I mean, we were dialed in. . . . A lot of the distractions, if you will, were outside. They were created by us. But they kind of were magnified outside our locker room. And inside the locker room, it never really was an issue. I know I wasn’t looking forward. I know a lot of guys I talked to weren’t. I don’t think that was as big a deal as it was probably made to be.”

The Jaguars’ big day on offense came after they’d managed only 10 points in their first-round playoff triumph over the Buffalo Bills, a game in which Bortles had more rushing yards than passing yards. His passing was much more reliable Sunday, as he threw for 214 yards and a touchdown.

“I always had faith in them,” Campbell said. “We take turns making plays. They made plays throughout the whole year. I know at times it was the defense made more. But there were times the offense made huge plays. The thing about it is, a good team needs to be able to count on each other. We gave up 42 points on defense. That’s a lot of points.”

Read more from The Post:

Threat to kill Steelers players, fans during playoff game ends in arrest

NFL playoffs: Brady, Patriots advance; Eagles “upset” Falcons; will Antonio Brown play?

The Patriots’ James Harrison won’t be watching Steelers-Jaguars game

Tom Brady shows that 40 is nothing but a number

Nick Foles (yes, Nick Foles) leads Eagles past Falcons