It was shaping up just right, for the maximum amount of pain and just the right mix of schadenfreude and comeuppance.

The Pac-12 has been here so many times before, the butt of so many jokes, that any longtime fan of the league knew that destruction and chaos were inevitable.

What would have been the hilarious scenario? Washington State beating Washington, then the Huskies dominating Oregon in the conference title game to deny the Pac-12 a College Football Playoff representative once again, in the league’s final year of existence.

That’s what we’ve come to know about this league, right? And masochistically loved about it? You grow used to the taste of blood out here.

Only nobody told Kalen DeBoer that a prerequisite for the job is stepping on a rake and smacking yourself in the face.

Nobody told the Washington Huskies that they were about to face defeat for the first time this year and the first time in 19 games.

Nobody told the Husky Stadium crowd that hoping and loving is for losers.

So, instead of playing to a hackneyed and horrible script, No. 4 Washington did what it has all year. It dug deep, smashed inevitability with a 2×4, and watched as Grady Gross’ 42-yard field goal kept the Huskies undefeated and their dream season alive.

You’ve heard of the Cardiac Cats? Meet the Heart Attack Huskies.

Do they have the magic to do it one more time?

*****

When a team plays with fire as much as Washington has, you start to wonder if they’re just impervious to it.

For all we know, Kalen DeBoer could be one of those circus freaks who swallows fire-soaked swords.

We at least know Ryan Grubb is a tight-rope walker, after pulling out the most death-defying of calls in the most precarious of positions.

“It’s up there,” DeBoer said about where the play call ranked in terms of risk in his career. “It’s up there. Way back there have been some risky plays. But that was up there, given the moment, field location, time in the game.”

With the score tied at 21, the ball on its own 29-yard line, and needing 1 more for a first down, Grubb called a triple option on fourth-and-1. Let Heisman hopeful Michael Penix Jr. run it himself, hand it off to Dillon Johnson or pitch it on the reverse to Rome Odunze.

Penix put the ball in Odunze’s hands, the star receiver took it 23 yards, and Washington inched closer to destiny.

It would be delivered off the foot of Grady Gross, a walk-on kicker who’d missed 3 of his previous 4 field goal attempts.

So, of course, he attempted this one from 42 yards out — made tougher by a sack by Brennan Jackson that put the Huskies back an extra 9 yards — and nailed it.

Afterward, he got a scholarship.

It was a dream moment in a season full of them for the Huskies.

*****

The stage was set up perfectly for utter disappointment.

You had the Cougars, who started off so well this year — 4-0, a September to remember, wins over Wisconsin and Oregon State — and then watched as things went south so starkly. Almost as quickly 4-0 became 4-6, a stunning 6-game slide sending Wazzu fans up the wazoo. Then a blowout win in Week 12 over Colorado, and a sudden chance to gain bowl eligibility.

Better yet, a chance to take a bite out of the Apple Cup, which had largely eluded the Cougars in recent years. The game has been played almost nonstop since 1900, 115 matchups in total, with the Huskies winning 8 of the last 9.

And you had a Washington team that had won 19 straight, but 12 of them by 10 points or fewer.

The Huskies felt ripe for the picking, especially as Cam Ward piled up over 300 passing yards.

But as they have all year, Washington found a way.

“Rivalry games are going to be special,” DeBoer said. “Hats off to Washington State and Coach Dickert for making it tough.”

Now comes their date with destiny.

The Pac-12 title game felt like 2 bullet trains speeding toward each other for weeks. Now it’s finally here.

The first time the teams met, it was Oregon going for it — 3 times on fourth down — and falling on their face. Now it’s Washington going for broke.

It takes a set of marbles to win all the marbles, and that’s what they’ll play for on Friday in Las Vegas.

“We’ve been doing this all season. Defense making big time stops when we needed it most and the offense finding a way to get those points on the board,” Penix said. “It was just back-to-back-to-back, always a good team we were playing. Being able to find a way to win in those tough moments shows this team’s character and it’s pretty special.”