Former Massachusetts Gov. and 2012 GOP presidential nominee Mitt Romney announced Friday he is voting for Sen. Ted Cruz in the Republican caucuses in Utah, saying Mr. Cruz is likely the best shot at denying Donald Trump the party’s presidential nomination at this point.

“The only path that remains to nominate a Republican rather than Mr. Trump is to have an open convention,” Mr. Romneysaid in a statement on his Facebook page. “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.”

Mr. Romney recently campaigned for Ohio Gov. John Kasich in Mr. Kasich’s home state, and said he would have voted for Mr. Kasich in Ohio.

“But a vote for Governor Kasich in future contests makes it extremely likely that Trumpism would prevail,” Mr. Romney said.

“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,” he said.

On Friday, Mr. Romney said there is a contest going on 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.

Mr. Trump reacted to the news by saying on Twitter that Mr. Romney’s announcement would be “good” for the billionaire businessman.

John Weaver, chief strategist for Mr. Kasich’s campaign, said the establishment has gotten it wrong for the entire primary and that it’s “unfortunate” Mr. Romney is getting “bad political advice.”

“John Kasich is best positioned to stop Donald Trump in the Midwest, Mid-Atlantic and Pacific coast states,” Mr. Weaver said. “This is just the old establishment trying again to game the political system, but John Kasich’s defeated the Republican establishment his entire career.”