WEST VALLEY CITY, Utah — Mitt Romney was forced on Saturday into a Republican primary for a United States Senate seat in Utah as he looks to restart his political career by replacing Orrin G. Hatch, a longtime senator who is retiring.

Mr. Romney, a former governor of Massachusetts and the Republican candidate for president in 2012, remains the heavy favorite to win the Senate seat in November. But he could have bypassed a primary altogether by earning a majority of votes on Saturday at the state’s G.O.P. convention.

Instead, the far-right party delegates preferred State Representative Mike Kennedy, who got 51 percent of the vote to Mr. Romney’s 49 percent.

Voters will decide between the candidates in a June 26 primary. Mr. Romney had previously secured his spot on the ballot by collecting 28,000 voter signatures, but he said on Saturday that the choice was partly to blame for his loss.