In 2016, Donald Trump nicknamed Sen. Ted Cruz "Lyin' Ted," and among other insults, posted an image that appeared to call Cruz's wife ugly. Cruz, in turn, called Mr. Trump a "sniveling coward" and told him to leave his wife "the hell alone."

But that was then. Now, Mr. Trump will be hitting the campaign trail for his former arch-rival Cruz, who has closely aligned himself with the president's policies. Cruz needs all the help he can get in November ahead of a tough reelection race against Democrat Beto O'Rourke. Mr. Trump announced on Twitter Friday that he will be campaigning for Cruz, in "the biggest stadium in Texas we can find," in October.

"I will be doing a major rally for Senator Ted Cruz in October," the president tweeted. "I'm picking the biggest stadium in Texas we can find. As you know, Ted has my complete and total Endorsement. His opponent is a disaster for Texas - weak on Second Amendment, Crime, Borders, Military, and Vets!"

I will be doing a major rally for Senator Ted Cruz in October. I’m picking the biggest stadium in Texas we can find. As you know, Ted has my complete and total Endorsement. His opponent is a disaster for Texas - weak on Second Amendment, Crime, Borders, Military, and Vets! — Donald J. Trump (@realDonaldTrump) August 31, 2018

Texas, a traditionally red state, is looking better for Democrats than Republicans would like, and Mr. Trump's newly announced visit is a sign of that. The president won the state by 9 points in 2016. An NBC News/Marist poll this month shows Cruz leading O'Rourke by 4 points, and an Emerson poll also conducted this month shows Cruz ahead by just 1 point.

Republicans need to keep that Senate seat, with Mr. Trump occasionally bemoaning that the GOP's current 51-49 majority in the Senate isn't a real majority. The president said as much on Thursday night at a rally in Indiana, noting that if someone has a cold and has to stay home, that majority can disappear.

Get Breaking News Delivered to Your Inbox

Cruz and O'Rourke have each raised more than $23 million for the race so far, according to campaign finance data. The two candidates have yet to finalize any debate schedule.