WASHINGTON — President Trump said on Monday that Mitt Romney, the 2012 Republican presidential nominee and his frequent political adversary, had his blessing to run to replace Senator Orrin G. Hatch of Utah, who will retire at the end of the year.

“He will make a great Senator and worthy successor,” Mr. Trump wrote on Twitter, “and has my full support and endorsement!”

The endorsement began yet another chapter in a fraught political relationship defined by bruising intraparty battles. Mr. Romney’s camp has privately mulled how far he should go to embrace a president whose candidacy he excoriated as bad for American democracy. And on Friday, Senator Mitch McConnell of Kentucky, the majority leader, publicly urged the president to support Mr. Romney.

“We don’t want to lose the seat,” Mr. McConnell said in an interview with The New York Times, “and this looks like a pretty formidable candidate.”