Sen. Ted Cruz addresses the crowd at the RNC on July 20, 2016. (Toni L. Sandys/The Washington Post)

Sen. Ted Cruz risked his political career Wednesday night when he pointedly decided against endorsing Donald Trump from the stage of the Republican National Convention in Cleveland.

It was a stunning thing to witness. The man who finished second to Trump in the primary race, the man everyone expected to, eventually, fall in line behind Trump, the party's nominee, steadfastly refusing to do so — with the biggest possible spotlight shining on him.

Make no mistake: Cruz knew exactly what he was doing. And he almost certainly knew how much controversy it would cause.

At the heart of Cruz's gamble is, of course, the idea that Trump will lose the general election to Hillary Clinton, the presumptive Democratic nominee for president. But that's not all of it. Cruz is also banking on the idea that Trump will lose in such a way that it will cause a post-election reckoning by the Republican Party who supported him. That the GOP will wake from the fever dream of this election and ask itself, "What the heck were we thinking?" That, post-election, the thinness of Trump's affiliation with the Republican Party and loose commitment to conservative principles will be exposed in a way it simply has not been in the campaign to date.

And then — and this is very, very important to Cruz's massive gamble — that the politicians who stood with Trump will be tainted by their association with Trump heading into 2020. That includes House Speaker Paul D. Ryan (R-Wis.), Sen. Marco Rubio (R-Fla.), Wisconsin Gov. Scott Walker (R)— all former Trump rivals who, eventually and in their own ways, found a way to get behind the real estate mogul.

They will be on one side of the party. Cruz, he hopes, will be on the other, the one principled man left in the GOP. The man who stood up to the bully in the bully's back yard. "This is about principles and ideals," Cruz told the Texas delegation Thursday morning. "This is about standing for what we believe in."

Principle vs. politics. Standing firm vs. giving in.

That is how Cruz has to hope people come to view what he did Wednesday night. The alternative — a selfish act by a man who has always cared more about himself than his party — is certain doom for Cruz's political future on the national stage.

When you take a big risk, there are only two options: Big reward or big, fat failure. The immediate after-action analysis suggests that failure is the more likely result for Cruz, as he has been pilloried from almost every side of the GOP for his non-endorsement.

But Cruz did not make this play for the near-term. He knew that his fate depends on what happens Nov. 8 and how the outcome of that day is interpreted by the Republican Party.

Cruz is walking across a tightrope without a net, with someone — actually lots of people — shaking the wire as he walks. Even if you think, or want, him to fall, you sort of have to admire that he's willing to step out on the wire at all.

Read more:

Ted Cruz and the speech that threatened to tear the convention apart

How Donald Trump uses insults, threats and lawsuits to silence critics

Trump undercut key foreign policy commitments just before Pence pledged to uphold them