Republican U.S. Sen. Ted Cruz (Tex.), left, and Democratic U.S. Rep. Beto O'Rourke shake hands after their first debate for a U.S. Senate seat on Sept. 21, 2018, in Dallas. (Nathan Hunsinger/Dallas Morning News/AP)

Sen. Ted Cruz’s most popular tweet Friday night — the one with tens of thousands of likes, retweets and comments — ostensibly was meant to slam his Democratic opponent, U.S. Rep. Beto O’Rourke.

“In Beto O’Rourke’s own words,” tweeted the Texas Republican, who has found himself in the midst of a surprisingly tight reelection race for his U.S. Senate seat in a formerly solid-red state.

Cruz then linked to a video of a speech O’Rourke gave at a Dallas church in which he discussed the death of a local resident named Botham Shem Jean, who was killed in his own apartment on Sept. 6 after a police officer said she mistakenly walked in thinking it was her unit.

“How can it be — in this day and age, in this very year, in this community — that a young man, African American, in his own apartment, is shot and killed by a police officer?” O’Rourke asked the congregation, which grew increasingly animated.

O’Rourke then demanded to know why police thought it was relevant to publicize that there had been a small amount of marijuana found in Jean’s kitchen rather than divulge more details about the shooting.

“How can that be just in this country? How can we continue to lose the lives of unarmed black men in the United States of America at the hands of white police officers?” he asked. “That is not justice. That is not us. That can and must change.”

The congregation applauded. Some gave him a rousing standing ovation. It became yet another clip of O’Rourke on the campaign trail that would go viral, especially in left-leaning circles.

And so it befuddled many when Cruz, to borrow from a modern political meme, just . . . tweeted the video out.

Was Cruz trying to say Jean’s death was justified? That police should be able to enter a random apartment and kill the resident inside? Could it actually have been an endorsement for O’Rourke as some kind of “novel political strategy?"

“And? The dude was in his own apartment and he was killed for no reason,” read one of the top replies. “if the officer were black and the victim white, you’d be screaming for answers #YourRacismIsShowing #VoteBeto”

Others said they were happy to retweet the video — as an “inspiring” reason to vote for O’Rourke.

“Senator, you are a Grand Master of the Self-Own,” actor Michael McKean tweeted.

Representatives for both the Cruz and O’Rourke campaigns did not immediately respond to requests for comment Saturday morning.

A possible explanation for the video came in a tweet Cruz posted just before, in which he charged: “Over and over again Congressman O’Rourke — when faced with police and law enforcement — he sides against the police.”

Even then, people picked up that Cruz was referring to the Jean case and questioned why demanding police accountability was anti-police.

Cruz and O’Rourke sparred in their first debate Friday night. Evidence that Cruz might have at least quietly reached his intended audience with the O’Rourke video he tweeted out was clearer then, when the two candidates were asked to address the Jean shooting.

At the debate, Cruz said it was “a mistake” for O’Rourke to have immediately called for Officer Amber Guyger of the Dallas police to be fired. Many in the live audience cheered Cruz’s response.

The debate ended on a bitter note after each candidate was asked to name something he admired in the other. O’Rourke said he admired Cruz sacrificing his time to devote it to the campaign trail, showing his love of the United States.

In his response, Cruz agreed — but couldn’t resist ending his message with an attempt to brand O’Rourke as a “socialist” who was just like 2016 presidential candidate Sen. Bernie Sanders (I-Vt.).

“I think you are absolutely sincere, like Bernie, that you believe in expanding government and higher taxes,” Cruz said.

Without missing a beat, O’Rourke replied wryly: “True to form."

Hours before their Friday debate, the Cook Political Report moved the Texas Senate race from “leans Republican” to “toss-up.”

It’s not the first time supporters of Cruz’s campaign have tried to attack O’Rourke with mixed results. Last month, the Texas GOP tweeted a black-and-white photo of a young O’Rourke when he was in a punk-rock band.

“Maybe Beto can’t debate Ted Cruz because he already had plans . . . ” the GOP captioned.

“Is it a sin to be part of a band now? I’m so confused,” one Twitter user replied.

In March, Cruz’s campaign released a 60-second jingle meant to ridicule O’Rourke for changing his name to “Beto” to try to appeal to voters in a state with a significant Hispanic population.

That campaign backfired after numerous people pointed out that Cruz himself had been born Rafael Edward Cruz, in Canada.

Read more:

Beto O’Rourke gets more attention than any other 2018 candidate. Will it translate to votes?

Sorry, Mr. President: The Hurricane Maria death toll in Puerto Rico didn’t grow by ‘magic.’

John Kerry criticized for saying Trump has ‘the insecurity of a teenage girl’