From the crowd booing Sen.Ted Cruz to vice presidential nominee Mike Pence delivering a speech, here's what happened during the third day of the Republican Presidential Convention. (Thomas Johnson/The Washington Post)

Republican leaders attempted Wednesday to steer their national convention in a more substantive and unified direction behind GOP presidential nominee Donald Trump, but their efforts came up against an eruption of lingering bitterness from the brutal primary campaign season.

The capstone of the evening was supposed to be a speech by Indiana Gov. Mike Pence, the newly named vice-presidential nominee. But the more riveting moment came earlier, when Sen. Ted Cruz (Tex.) pointedly refused to endorse Trump, who had bested him in the race for the nomination, and urged Republicans to “vote your conscience.”

As Cruz was speaking, delegates chanted, “Endorse Trump!” — to which the senator replied dismissively, “I appreciate the enthusiasm of the New York delegation.”

In response, delegates from Utah, Washington and Arizona, some with the word “troublemaker” attached to their floor passes, began shouting, “Ted! Ted! Ted!”

Cruz was jeered off the stage as Trump, with his characteristic showman’s instincts, entered the hall and gave a thumbs-up.

The showdown between two of the GOP’s most abrasive personalities was evidence that many party stalwarts have not reconciled themselves to the fact that the celebrity billionaire who vanquished 16 opponents in the primary will be their standard-bearer in the fall. Their resistance continues, even though speaker after speaker pleaded with them to consider that the alternative is a Hillary Clinton presidency.

“After a long and spirited primary, the time for fighting each other is over. It’s time to come together and fight for a new direction for America. It’s time to win in November,” said Sen. Marco Rubio (Fla.), another defeated candidate. But he spoke via video, having decided to avoid the convention.

Former House speaker Newt Gingrich (Ga.), who had been in the running to become Trump’s vice-presidential pick, tried to do damage control in his speech: “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.”

The call for unity was the sentiment of many on the convention floor, as well.

“There’s a lot of diversity in our party and that’s a strength of our Republican Party,” said West Virginia Attorney General Patrick Morrisey. “I have a lot of respect for Ted Cruz. But I’ve made the choice that I’m all in to defeat Hillary Clinton, and everyone should be all in to defeat Hillary Clinton.”

Clinton has been a stronger unifier of the Republican Party than Trump. As happened during the first two days of the convention, the hall broke into calls of “Lock her up!” on Wednesday when those onstage referred to the controversy over Clinton’s unauthorized use of a private email server when she was secretary of state.

Ted Cruz was being loudly cheered by many of the delegates at the Republican National Convention on July 20 – until he urged voters to "vote their conscience." (Peter Stevenson,Sarah Parnass,Jorge Ribas,Alice Li,Dalton Bennett/The Washington Post)

But several of the speakers dwelled less on painting a relentlessly negative portrayal of the state of the country and more on framing the choice that will confront voters in the fall on national security, the economy and the future of the Supreme Court, among other things.

The theme of the evening was “Make America First Again,” and it was aimed at setting the stage for the most important moment of the four-day convention: Trump’s acceptance speech Thursday night.

“The Democrats have not led us to a crossroads, they have led us to a cliff,” Florida Gov. Rick Scott told the gathering. “But this election is not actually about Donald Trump — or Hillary Clinton. In fact, this election is not about you or me. This election is about the very survival of the American dream.”

Pence’s speech had intentional echoes of one of the most famous ones that Ronald Reagan gave: his 1964 “Time for Choosing” speech on behalf of that year’s presidential nominee, Barry Goldwater.

That nationally televised address is often considered the moment when Reagan went from being seen as a Hollywood actor to becoming one of the most influential leaders of a burgeoning conservative movement.

Pence’s speech used not only the title phrase but also a call to a “rendezvous with destiny” and a dismissive reference to the presumption that a “little intellectual elite in a far distant capital can plan our lives better for us than we can plan them for ourselves.”

Pence and others acknowledged that Trump’s personal style can rub many the wrong way, but they portrayed his personal qualities as evidence that he is a strong and authentic leader.

“Donald Trump gets it. He’s the genuine article. He’s a doer in a game usually reserved for talkers. And when Donald Trump does his talking, he doesn’t tiptoe around the thousand new rules of political correctness. He’s his own man, distinctly American,” Pence said.

The expectation that Cruz’s comments would fall short of a full embrace brought a gibe from an earlier speaker, conservative radio show host Laura Ingraham.

“We should all — even all you boys with wounded feelings and bruised egos — pledge to support Donald Trump now,” she said.

In addition to Cruz, another former Trump rival, Wisconsin Gov. Scott Walker, spoke from the stage.

However, two others — former Florida governor Jeb Bush and Ohio Gov. John Kasich — have been notable no-shows at the convention. Kasich’s boycott is particularly awkward, given that he is governor of the state where the convention is taking place, and has been making appearances in this city.

Cruz had told Trump on Monday that he was not going to endorse him, chief Cruz strategist Jason Johnson said.

However, the senator from Texas did not share the text of his speech in advance of its delivery with the Trump campaign or Republican officials, according to a senior convention official familiar with the program. Text of the address was delivered to party officials shortly before its delivery.

The official, who spoke on the condition of anonymity because he wasn’t authorized to discuss convention planning publicly, described Cruz’s decision to withhold an endorsement as a “cheap shot,” especially after Republican National Committee Chairman Reince Priebus allowed a prolonged roll call of the states Tuesday night to formalize Trump’s nomination and publicly record the raw delegate totals.

“He could have said, ‘I encourage you to vote for Republicans up and down the ballot.’ . . . This was not a Ronald Reagan moment,” the official said.

Trump tweeted a response, referring to the promise by all primary candidates to support the eventual nominee: “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!”

Former Virginia attorney general Ken Cuccinelli II, a Cruz adviser who had led the procedural revolt against Trump’s nomination, said he escorted Cruz’s wife, Heidi, from the arena after her husband’s speech because he was concerned for her safety. He said she had only one RNC staffer with her and no security personnel.

“I pulled her away so she could get out. People were closing in on her physically,” he said. “People in my own delegation started approaching her and yelling at her. Someone pointed at her and said, ‘Goldman Sachs.’ ”

He said he was surprised by the reaction.

“I thought everybody would just let Cruz have his 15 minutes,” Cuccinelli said. “It was intended as a courtesy, but they were just wired so tight to react so negatively to Ted.”

There was also the lingering drama from the Monday address by Trump’s wife, Melania, which included portions lifted from the speech Michelle Obama gave at the 2008 Democratic National Convention, when her husband, Barack Obama, was running for president.

In a statement issued using the Trump Organization letterhead and not the campaign insignia, a staff member took responsibility for the insertion of the material and apologized. She said that she offered to resign but that Trump and his family encouraged her to stay.

Meredith McIver said she was an “in-house staff writer” who worked on the speech.

“A person she has always liked is Michelle Obama,” McIver said of Melania Trump. “Over the phone, she read me some passages from Mrs. Obama’s speech as examples. I wrote them down and later included some of the phrasing in the draft that ultimately became the final speech.”

Shortly before the campaign distributed McIver’s statement, Trump addressed the controversy via Twitter, although he did not weigh in on allegations that his wife had borrowed language from the first lady’s speech. Multiple commentators and Trump opponents have said the duplication of the phrases amounts to plagiarism.

“Good news is Melania’s speech got more publicity than any in the history of politics especially if you believe that all press is good press!” he wrote in one message. And he attempted to shift blame to Clinton, writing, “The media is spending more time doing a forensic analysis of Melania’s speech than the FBI spent on Hillary’s emails.”

Louisa Loveluck, Welsey Lowery, Ed O’Keefe, Philip Rucker, Isaac Stanley-Becker and Katie Zezima in Cleveland contributed to this report.