Former 2016 presidential hopeful Sen. Ted Cruz (R-Tex.) encouraged voters to head to the polls in November, but did not specifically endorse Donald Trump. The crowd booed as he ended his speech and Trump entered the arena. (The Washington Post)

Sen. Ted Cruz (R-Tex.) withheld his endorsement from Donald Trump on Wednesday night in a speech at the Republican National Convention, offering his congratulations instead — prompting booing and jeers from a fractious crowd and highlighting the lingering rifts in the Republican Party.

“I want to congratulate Donald Trump on winning the nomination last night,” Cruz said at the top of his speech, his highest-profile address since ending his campaign for president in May and effectively clearing the final hurdle between Trump and the nomination.

Cruz then proceeded to tell an emotional story about a police officer slain in the mass shooting in Dallas.

“As I thought about what I wanted to say tonight, Michael Smith’s story weighed on my heart,” he said of the officer. “Maybe that’s because his daughter, Caroline, is about the same age as my eldest daughter and happens to share the same name.”

Later on, Cruz touted policies championed by Trump, such as building a wall on the U.S.-Mexico border, without mentioning the GOP nominee by name.

But he also told voters to “vote your conscience” in November, unlike the many speakers who openly urged attendees to vote for Trump.

The final moments of Cruz’s speech were some of the most dramatic of this week’s convention. While he had received steady cheers early in his speech, the crowd grew angrier later on, with some loudly shouting that Cruz should endorse Trump.

As Cruz wrapped up, Trump made a surprise appearance in the arena. Heads turned to look at him and distracted from Cruz’s speech. When Cruz finished, there were loud boos throughout the arena. At that instant, Trump walked down to his family VIP box waving to fans and flashing a grin.

At least one person in the hall posted video of Cruz’s wife Heidi exiting the venue to jeers.

A coterie of delegates, some with the word “troublemaker” attached to their floor passes, began shouting “Ted! Ted! Ted!”

The crowd in the seats behind them tried to shout them down by yelling “Trump!” To the right, another group hollered, “Honor your pledge!”

Former House speaker Newt Gingrich tried to seize the moment after Cruz’s speech, referencing his call for Republicans to vote their conscience.

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)

“I think you misunderstood one paragraph that Ted Cruz – who is a superb orator – said, Gingrich told the crowd. “And I just want to point it out to you. 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. 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.”

After the evening’s speeches, Trump tweeted: “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!”

Earlier in the evening, another former Trump rival, Wisconsin Gov. Scott Walker, delivered a call and response address, nodding to the signs delegates held up in the arena where the convention is being held.

“America deserves better” than Hillary Clinton for president, was Walker’s message.

Florida Sen. Marco Rubio skipped the convention but recorded a brief video message declaring: “The time for fighting each other is over. It’s time to come together.”

Headlining the group of speakers was Indiana Gov. Mike Pence, who Trump named as his running mate last week. Pence sought to soften some of Trump’s message.

“I’ll grant you he can be a little rough with politicians on a stage, and I’ll bet we see that again. But I’ve seen this good man up close. His utter lack of pretense, his respect for the people who work for him and his devotion to his family,” Pence said.

And for the third straight night, a member of the Trump family had a prominent speaking role, when Trump’s son Eric addressed the delegates.

But it was the reaction to Cruz’s speech that stole the show.

Eugene Delgaudio, a delegate from Sterling, Va., who backs Trump, was upset with Cruz.

“If you’re a real fighter, a real fighter can take a punch to the face, get up and congratulate the man who beat him in a fair fight. A sore loser is never appreciated,” he said.

Rep. Steve King (R-Iowa), one of Cruz’s leading supporters in the primary, took a different view.

“They were chanting ‘Trump’ in the face of Cruz and then Donald came down and totally distracted from Cruz. The atmosphere that could’ve been created by a well-crafted speech was ruined.”

Florida Gov. Rick Scott kicked off the speeches earlier in the evening, advancing an argument that Democrats have failed the country across a range of issues.

“Today, America is in terrible, world-record-high debt,” he said. “Our economy is not growing. Our jobs are going overseas. We have allowed our military to decay, and we project weakness on the international stage. Washington grows while the rest of America struggles. The Democrats have not led us to a crossroads, they have led us to a cliff.”

Next up was conservative radio host Laura Ingraham, who decried a lack of “respect” — for the police, for the government and veterans, among others, and called on GOP holdouts to fall in line behind the nominee.

“Hillary Clinton thinks America is just another nation in a global order. Donald Trump — he understands that American greatness, it comes from her people,” she said.

Wednesday night’s speeches could be upstaged, however, by the fallout from Melania Trump’s Monday night speech. A Trump organization employee said earlier in the day that she was responsible for lifting parts of the speech from a 2008 address first lady Michelle Obama delivered.

And, after two days of mostly restrained protests outside the convention, tensions briefly escalated Wednesday afternoon when demonstrators burned an American flag outside an entrance point for delegates.

A small far-left political group called the Revolutionary Communists claimed responsibility. The organization has been active in protests against police brutality and has been one of the more visible groups protesting during the convention.

“This was a planned action,” said Carl Dix, the group’s founder. “A flag was burned, and then the police descended on people, some people were arrested.”

Dix added: “We took this action because that flag has flown over horrific crimes of this empire.”

An eyewitness said the group had linked arms to shield the flag as it singed. Moments later, police swarmed the area, which was crowded with bystanders and counter-protesters.

Two officers suffered minor injuries, according to the Cleveland police. The police said 17 arrests were made during the day in relation to the convention protests.

For the second day in a row, the Trumps faced questions about what happened at the convention Monday. In a statement issued under Trump organization letterhead and not the campaign insignia, Meredith McIver said she was an “in-house staff writer” who worked on Melania Trump’s highly scrutinized address. McIver apologized and said she offered to resign but was encouraged by Trump and his family to stay.

“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.”

McIver said she “did not check Mrs. Obama’s speeches. This was my mistake, and I feel terrible for the chaos I have caused Melania and the Trumps, as well as to Mrs. Obama. No harm was meant.”

McIver was the co-author of several of Donald Trump’s works, mainly his books offering business advice. On one book she co-wrote, “Trump: Think Like a Billionaire,” Trump attributes his success — like that of “Jeff Bezos, Steve Jobs, and Ted Turner” — to an “unrelenting focus [on] achieving their dreams, even if it’s sometimes at the expense of those around them.”

Shortly before McIver’s statement was distributed by the campaign, Trump himself addressed the controversy on Twitter, though he did not weigh in on allegations that his wife had borrowed language from the first lady’s speech to the Democratic National Convention eight years ago. 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 onto his Democratic rival, Hillary Clinton, writing, “The media is spending more time doing a forensic analysis of Melania’s speech than the FBI spent on Hillary’s emails.”

The latest comments capped a dizzying, more than day-long attempt by his campaign to explain — but primarily dismiss — evidence that Melania Trump’s speech had repurposed multiple lines from Michelle Obama’s speech. The attempt was complicated by Melania Trump’s statement Monday that she had written the speech herself.

A Trump campaign spokesman said early Tuesday that “a team of writers” took notes and “included fragments that reflected her own thinking.” Later Tuesday, the campaign’s chairman, Paul Manafort, refused to acknowledge wrongdoing on the part of the campaign, saying the speeches touched on common themes and accusing Clinton of orchestrating the allegations. New Jersey Gov. Chris Christie, a prominent surrogate, said only 7 percent of the speech showed overlap with Michelle Obama’s remarks.

Manafort continued to deny early Wednesday that the speech showed signs of plagiarism, telling CNN that the two speeches under scrutiny employed “similar words” but, because Melania Trump is not a candidate for office, “the controversy that you’re talking about is not meaningful at all.”

“She was expressing her personal feelings,” Manafort said. “That’s the final word.”

On the convention floor, Wednesday’s night’s theme was “Make America First Again.” Speakers intend to draw contrasts between Trump and Clinton on national security, the economy and the future of the Supreme Court, among other things.

Marc Fisher, Jenna Johnson, Louisa Loveluck, Philip Rucker and Wesley Lowery contributed to this report.