CLEVELAND ― Sen. Ted Cruz (R-Texas) saw his big moment at the Republican National Convention drowned out by thunderous boos on Wednesday night as he notably declined to endorse his former foe Donald Trump for president.

The speech had started with a diametrically different tone. Cruz came out to a hero’s welcome, and earned sustained applause as he laid out a conservative case for governance.

“We deserve an immigration system that puts America first. And yes, builds a wall to keep us safe,” said the senator, in a nod to the now formal Republican presidential nominee.

But the crowd, led by the New York delegation, grew notably restless as the speech went on and Cruz refused to mention Trump’s name. Cruz acknowledged them ― “I appreciate the enthusiasm of the New York delegation” ― but kept soldiering on, a slight smirk on his face.

The restlessness turned to outright jeers when Cruz told the crowd to “vote your conscience” ― a phrase that has been adopted by the group of Republicans who had asked delegates to not coronate Trump as the nominee. And when he declared that Republicans are “fighting, not for one particular candidate or one campaign,” the boos began.

Trump’s children looked on from their box seats, stoic and not applauding.

As the speech entered its closing stages, Cruz had completely lost the crowd. Screams of “endorse” came from the rafters. John Antoniello, the Chairman of the Staten Island GOP, helped lead them.

“It didn’t seem to me he was ever going to say it,” Antoniello told The Huffington Post. Antoniello said he “cheated” by looking back at the TelePrompTer visible behind him, under the camera riser, and “could see he wasn’t saying it.”

And so he started chanting louder: “Endorse Trump.”

If the situation wasn’t chaotic enough, it rose a level higher in that moment. In an act of pure showmanship, the room’s eyes turned back to that Trump booth. The candidate had perfectly timed his entrance to take away attention from his former primary foe.

Cruz had been upstaged while standing on the stage.

Critics will say that he had tried to be too clever by half. But the truth is, much of Wednesday night’s drama shouldn’t have come as a surprise. Over the course of the week at the Republican National Convention, one of the more entertaining side shows has been the battle among GOP elites to position themselves for the 2020 election. And no politician has been on the receiving end of more of that 2020 chatter ― facilitated, in part, by his top adviser ― than Cruz.

The Texas senator is naturally positioned to emerge from the wake of a Trump electoral defeat, should that loss transpire. He won the second most delegates during the 2016 primary, and as the most high-profile conservative in the party, he gives GOP voters a chance to move on from a Trump loss without moving ideologically to the middle.

Cruz has carefully fed the chatter. Well before he took the stage, it was leaked that he would not formally back Trump, in a speech he reportedly wrote himself. Part of it, naturally, is that the Trump campaign treated him like hell during the primary, mocking his wife, suggesting he had engaged in multiple affairs, and saying his father hobnobbed with Lee Harvey Oswald. But part of it is also because he wants to emerge as the candidate regretful Republicans turn to after the fall.

“Gotta give the guy credit. That’s stand-up. I’ve got to give him credit for his integrity to hold up and hold his own chops,” said a Wyoming delegate who said he was originally bound to Cruz. “At the same time, I know that he’s a good Republican and he’s going to back the Republican Party. And I’ve got to say, he’s not alone in this. He is by far from being alone.”

But by letting it be known early on that he would not formally endorse, Cruz also gave the Trump campaign plenty of time to prepare.

“He had an opportunity to blow the roof off the place, and he blew it,” said Carl Paladino, the Buffalo real estate developer who is one of Trump’s top backers in the state.

Peter Kalikow, the former owner of the New York Post and New York delegate, said he wasn’t surprised that Cruz didn’t endorse Trump.

“No, nothing stupid that he does ever surprises me,” he said.

HEIDI CRUZ escorted out by security as crowd gets angry at Cruz for his speech. One Trump supporter shouting "Goldman Sachs!" at her — Manu Raju (@mkraju) July 21, 2016

Later in the evening, former House Speaker Newt Gingrich (R-Ga.) tried to do some damage control, saying he believed Cruz’s speech was more positive toward Trump than the crowd believed.

“Ted Cruz said you can vote your conscience for anyone who will uphold the Constitution,” Gingrich said. “This election, there is only one candidate who will uphold the Constitution. So to paraphrase Ted Cruz, if you want to protect the Constitution of the United States, the only possible candidate this fall is the Trump-Pence Republican ticket.”

Newt's prepared remarks said, "Senator Ted Cruz in particular made the key point that we need to elect the Trump-Pence Republican ticket." — Ryan Lizza (@RyanLizza) July 21, 2016

Trump commented on the speech later Wednesday night on Twitter:

Wow, Ted Cruz got booed off the stage, didn't honor the pledge! I saw his speech two hours early but let him speak anyway. No big deal! — Donald J. Trump (@realDonaldTrump) July 21, 2016

Jonathan Cohn contributed reporting.