CLEVELAND — Bringing embarrassment to Donald Trump and boos from his supporters, conservative firebrand Ted Cruz used his prime-time speaking slot at the Republican National Convention Wednesday night to congratulate his former presidential rival but urge Republicans to “vote your conscience.”

It was supposed to be Indiana Gov. Mike Pence’s big night to tell Americans why he’s the best conservative to serve as vice president under a Trump presidency.

But it was Cruz — who has vowed to run again in 2018 — who first grabbed the spotlight.

Trump’s campaign has struggled to get the New York billionaire’s nominating convention on track, and Cruz on Wednesday provided the latest derailment with his refusal to formally endorse Trump.

Under a strong third night lineup at the Republican National Convention, unity was among the most powerful themes, as former presidential candidates Wisconsin Gov. Scott Walker, Cruz and Florida Senator Marco Rubio — via a video — vowed to help the Republican party see a win in the November presidential election.

For all the flashy comments Trump has made since he announced his candidacy, it is Pence, an Evangelical Republican, who is meant to bring the on-the-fence voters on board.

“I’m a Christian, a conservative and a Republican. In that order,” Pence told the crowd, repeating his trademark line.

He lauded Trump with a self-deprecating joke:

“He’s a man known for a large personality, a colorful style and lots of charisma, and so I guess he was just looking for some balance on the ticket.”

But Cruz, who dropped his presidential bid in May after losing to Trump in the Indiana primary, delivered a powerful message, calling for the “return to freedom.”

Instead of an endorsement, he offered simple congratulations to Trump — who dubbed Cruz “Lyin’ Ted” during the campaign — for winning the nomination.

“We’re fighting, not for one particular candidate or one campaign, but because each of us wants to be able to tell our kids and grandkids … that we did our best for their future, and for our country,” Cruz said.

It was clear Cruz was looking a little further than November’s election.

While never directly asking the crowd to vote for Trump, Cruz urged support for all Republicans this election season.

“And to those listening, please, don’t stay home in November. Stand, and speak, and vote your conscience, vote for candidates up and down the ticket who you trust to defend our freedom and to be faithful to the Constitution,” Cruz said.

Cruz’s comments sparked the New York delegation — those who clinched the nomination for their home state choice on Tuesday — to boo and chant “We Want Trump,” showing a bit of the dissension among the packed arena.

As Cruz continued to talk about the need for unity within the Republican party, his remarks ended with more boos.

Former House Speaker Newt Gingrich, who was on the short list to become Trump’s running mate, tried to undo the damage from Cruz’s speech, saying the Texas senator was misunderstood.

“Ted Cruz said you can vote your conscience for anyone who will uphold the Constitution. In this election, there is only one candidate who will uphold the Constitution,” Gingrich said to a standing ovation.

But Trump and his campaign didn’t try to finesse Cruz’s meaning.

Trump Tweeted that he had seen Cruz’s speech but let him speak any way, despite a pledge GOP presidential candidates made during the primary to support whoever became the nominee.

Michael Cohen, executive vice president in the Trump Organization, said Cruz “behaved like a baby.”

“I really believe that he committed political suicide today,” Cohen said on CNN, saying the national Republican committees should not back Cruz for re-election.

“He should never have the opportunity to be in that position because he lied to the American people,” Cohen said.

Delegates seemed unhappy with Cruz as well.

“Many people were hoping for party unity in Trump’s endorsement,” said Illinois State GOP Chairman Tim Schneider. “This is my first Republican convention, so I guess you could say this is a surprise.”

Indiana Republican Party Chairman Jeff Cardwell said: “I do not think this was a disaster, and I am an evangelical. He didn’t honor his pledge. But it was a surprise.”

Ohio delegate Bonnie Ward said “Cruz speech took the wind out of our sails. It was very disturbing, that’s for sure.”

Much better received was Pence, who accepted the vice presidential nomination in a lengthy and very traditional address to the convention hall in which he spoke about his humble upbringing and his love for his family. He called Trump a man “who never quits, who never backs down,” as he urged support for a change in the White House.

“It’s change versus status quo,” Pence said. “And my fellow Americans, when Donald Trump is elected president of the United States, the change will be huge.”

Rubio delivered a very brief video message, and actually named Trump as his favored candidate, while keeping his focus on Democrat Hillary Clinton.

“If she were any more on the inside, she’d be in prison,” Rubio said to cheers. “Americans deserve better than Hillary Clinton.”

Trump’s son, Eric, who along with Ivanka and Donald Trump Jr. helped to found the Trump Organization, spoke of his father’s life, which he called the “epitome of the American dream.”

Eric Trump dubbed his father the “common sense” nominee.

“It’s time for a president with common sense. It’s time for a president who understands the art of a deal and appreciates the value of a dollar, our tax dollars,” he said.

Earlier Wednesday, protesters who tried to set fire to an American flag sparked a massive security response — as police officers immediately cornered the two and began to spray pepper spray as the flag fire was lit out.

Authorities said two police officers were injured during the chaotic scene, and several were arrested.

Those protesters were handcuffed, but chaos ensued for nearly an hour on 4th Street, one of the main entrances to the convention perimeter.  At the intersection of 4th and Prospect, security and police officers ordered the public and media back to clear the area. Then the area was pushed further – with people unable to enter the convention area for a short time. Police officers chanted “Move back, move back,” repeatedly in an effort to clear the area.

Another effort to burn a flag was thwarted soon after the flame was lit with a protester apparently injured by the flame.

The Cleveland Fire Department was seen taking the woman away as she was escorted away from the street.

Contributing: Michael Sneed