After spending the last month bad-mouthing Donald Trump, Mitt Romney is officially putting his support behind rival candidate Sen. Ted Cruz.

“This week, in the Utah nominating caucus, I will vote for Senator Ted Cruz,” he said in a Facebook post that did not pull any punches on the party’s current front-runner.

“Today, there is a contest between Trumpism and Republicanism. Through the calculated statements of its leader, Trumpism has become associated with racism, misogyny, bigotry, xenophobia, vulgarity and, most recently, threats and violence. I am repulsed by each and every one of these,” he said.

“The only path that remains to nominate a Republican rather than Mr. Trump is to have an open convention,” the 2012 GOP presidential nominee continued. 

Trump has so far won 678 delegates in the state contests; Cruz has 413. Ohio Gov. John Kasich is trailing with 143 delegates. The nominee needs 1,237 delegates to win outright. Romney says his goal is to help Cruz get enough delegates to keep Trump from reaching that marker so that the matter instead goes to an “open convention” floor vote.

“At this stage, the only way we can reach an open convention is for Senator Cruz to be successful in as many of the remaining nominating elections as possible,” he said.

The latest headlines on the 2016 elections from the biggest name in politics. See Latest Coverage →

"I will vote for Senator Cruz and I encourage others to do so as well, so that we can have an open convention and nominate a Republican."

Romney has been dogging Trump for the last month -- sending out anti-Trump robo-calls for Marco Rubio (who has since suspended his campaign) and Kasich, calling Trump “a phony” and suggesting Trump has something scandalous hiding in his tax returns. In his comments Friday, he was pretty clear that his decision to vote for Cruz was motivated more by his dislike of Trump than anything else.

“I like Governor John Kasich. I have campaigned with him. He has a solid record as governor. I would have voted for him in Ohio. But a vote for Governor Kasich in future contests makes it extremely likely that Trumpism would prevail.”

Trump fired back at Romney, suggesting he should have put the same energy into his own failed presidential bid and chiding him for asking for Trump's endorsement during that campaign.

He reacted to Romney's endorsement on Twitter Friday.