HOUSTON — In a move that would have seemed unthinkable two years ago, President Trump offered a full embrace, literally and figuratively, of Ted Cruz in a massive rally here Monday night, imploring a crowd of tens of thousands of supporters to turn out for his former political rival in a closely watched Senate race in Texas.

In what is likely to be a highly scrutinized endorsement of the midterm elections, Trump and Cruz shared the stage at the top of an hour-long rally here, sharing a brief man-hug and a few arm squeezes before an estimated crowd of 18,000 in the heart of downtown Houston. It was the most public sign yet that Trump and Cruz, whose bitter battle for the 2016 Republican presidential nomination was one of the ugliest campaigns in recent memory, have put the past behind them — for now, anyway.

President Trump is greeted by Sen. Ted Cruz as he arrives for a campaign rally at the Houston Toyota Center. (Photo: Evan Vucci/AP)

“We had our little difficulties. … It got nasty,” Trump admitted, as he took the stage here. But he hailed Cruz as someone “who has become a really good friend of mine.” “Nobody has helped me more,” he added, citing Cruz’s efforts to pass tax cuts and to secure the recent confirmation of Brett Kavanaugh to the Supreme Court.

Trump’s trip came as Cruz has faced a stronger-than-expected challenge from Rep. Beto O’Rourke, a rising star Democrat whose unlikely candidacy has drawn massive crowds and national attention. A recent CNN poll found Cruz leading O’Rourke, a three-term congressman from El Paso, by 7 points, a relatively small margin in a state where no Democrat has won statewide office since 1994.

Trump formally endorsed Cruz months ago, but leading Texas Republicans have been appealing to the president to turn out for his former rival for the 2016 GOP presidential nomination. The two fought a bitter campaign marked by harsh personal attacks, including Trump’s suggestion that Cruz’s father, Rafael, had a connection to the assassination of President Kennedy.

Sen. Ted Cruz, Republican of Texas. (Photo: Saul Loeb/AFP/Getty Images)

While Cruz has remade himself into a close ally of the president, Monday marked the first time the two have shared a campaign stage in more than two years. The event drew extensive media attention. A couple of hundred journalists were credentialed for the rally, and as the moment came for Cruz and Trump to share the stage, they crowded near a press riser, squeezing in to observe the hotly anticipated moment of political rapprochement.

Story continues

Cruz appeared first, delivering a shorter version of his usual stump speech. But he also added new lines, pledging his political loyalty to Trump — vowing to campaign for the president when he seeks reelection in 2020. The vow was a sharp contrast to Cruz’s infamous 2016 Republican National Convention speech, in which he refused to formally endorse Trump.

“I’m going to make a prediction to every person here: In 2020, Donald Trump will be overwhelmingly reelected as president of the United States,” Cruz declared. “I am honored that President Trump is here endorsing and supporting my campaign, and I look forward to campaigning alongside him in 2020.”

This time, Cruz was there for Trump — and Trump, in turn, was there for him. As the president finally sauntered to the stage, slowly walking out to his theme song “God Bless the USA” by Lee Greenwood, the Texas senator patiently waited near the lectern, clapping and smiling.

Trump, in return, bashed O’Rourke — trashing him as a “radical” and a “socialist” and referring to him by his given name: “Robert Francis O’Rourke.” He said O’Rourke was a “stone cold phony” who would replace Texas values with “Nancy Pelosi values.”

Photo: Evan Vucci/AP

But for all the attention given to Trump’s appearance for Cruz, the president’s appearance here was a standard-issue “Make America Great Again” rally. The crowd was a sea of red-and-white MAGA hats. They waved the pre-printed signs that are handed out at most Trump rallies, not Cruz signs.

There was the familiar chant from the crowd of “Lock her up!” at the mention of Hillary Clinton. Trump pointedly reminded the media that he didn’t start the chant, although he didn’t disavow it either.

The president proudly laid claim to a description that some of his critics have used against him: “nationalist.”

“You know, they have a word, it sort of became old-fashioned. It’s called a ‘nationalist.’ You know what I am? I’m a nationalist. OK? I’m a nationalist.”

Before Cruz and Trump took the stage, Brad Parscale, Trump’s campaign manager, appeared on stage with campaign spokeswoman Katrina Pierson to urge the crowd to sign up for text messages to help Trump win reelection.

But Sen. John Cornyn, Cruz’s colleague, made the link between Cruz’s fate and Trump’s fortunes in 2020 explicit — suggesting that if Cruz falls, the president and other Republicans up for reelection in two years are at risk too. “Texas is the firewall in this midterm election,” he said.

_____

Read more Yahoo News midterms coverage: