West Valley, Utah (CNN) Mitt Romney did not win the Utah Republican Party's nomination on Saturday, meaning he must compete in a June primary election as he seeks to replace retiring US Sen. Orrin Hatch.

After a wild and raucous day of voting at the Utah GOP convention, the former Massachusetts governor and 2012 Republican presidential nominee was unable to win the 60% that he needed to head to the November ballot unopposed. When none of the 12 candidates were able to cross that threshold, the party continued with successive rounds of caucus voting until one candidate reached 40%.

On the second round of voting, Utah state representative Mike Kennedy emerged in the lead with 50.88%. Romney came in a close second with 49.12%.

Romney and Kennedy will now compete in a primary set for June 26.

After the vote, Romney said he was looking forward to a primary race.

"This is terrific for the people of Utah, and I really want to thank the delegates who stayed so late to give me the kind of boost that I got here today," Romney said, standing on the convention floor after the proceedings were adjourned. "We're going to have a good primary."

Kennedy, who had framed the race as David vs. Goliath, said when asked why he had edged out Romney in the vote that he wasn't sure.

"I don't know," Kennedy said when asked why he thought his message appealed more to delegates than Romney's. "I don't know -- it's just my message."

"We've got 60 days to reach out to as many voters as we can."

Romney is considered a favorite to win the seat. He is widely admired in this heavily Republican state, where he helped rescue the 2002 Salt Lake City Olympic Games. But when he decided to seek Hatch's seat, he landed in the middle of a long-running fight within the Utah Republican Party over its process for choosing its nominees.

Some Utah delegates and grassroots activists here have fought strenuously to maintain control over the process by keeping the party's complex nominating caucuses, instead of allowing candidates to secure a spot on the ballot by gathering signatures.

After the protracted legal fight, the legislature reached a compromise that created a two-option process to get to the ballot: Candidates could either gather the requisite 27,000 signatures or participate in the GOP caucuses.

Romney sought to straddle the divide by doing both, engaging delegates in all of Utah's counties. He has put 9,000 miles on his 2002 Chevy truck visiting elected officials and delegates all over the state to answer their questions and persuade them to support him.

But some delegates still resent the fact that Romney collected signatures, a process they feel favors deep-pocketed candidates over lesser-known contenders.

Romney demurred when asked after the vote whether he felt that he'd been punished by delegates who were angry that he had gathered signatures.

"I know there were many people who were not enthusiastic that we gathered signatures, but that's something I did; I'm proud of the fact that we did, and I now have 52,000 people who signed up to support me," he said, referring to the final tally of signatures that his campaign submitted to the lieutenant governor's office.

Romney's speech to delegates

Romney made his case to the delegates in a timed, five-minute speech Saturday night — taking his turn eighth among the 12 candidates running for US Senate after a random drawing. (The field included a candidate named Abe Lincoln -- who literally campaigned around the state at the convention dressed up as Abraham Lincoln.)

Romney rejected the notion that he was Goliath.

"I'm not Goliath, Washington DC is Goliath," Romney said, introducing himself to the 4,000 delegates as a "neighbor," a person of faith, and someone who helped rescue the 2002 Salt Lake City Olympic Games.

Kennedy, who also is a physician and an attorney, also invoked David and Goliath in his nominating speech.

"I started with David and Goliath, but not for the reason you might think," he said, alluding to Romney. "In this battle you are David, firm in your fight for liberty. Goliath is Washington DC -- intimidating but beatable. And I, I am your stone ready to be flung at the foes of liberty who seek to oppress us," he said, to cheers. "Working together we will defeat the Goliaths in Washington and restore our government where it belongs."

Romney took some heat for being a latecomer to Utah and the former governor of a blue state. Earlier, another Romney rival, Jeremy Friedbaum, pulled out a carpetbag as a prop on stage to protest the fact that Romney moved to Utah more recently than some of the other candidates. (Ultimately Friedbaum was booed off the stage and ended up with three votes).

Romney also spoke against federal overreach, particularly on federal lands, and said he would represent "Utah values" in Washington.

"It's time to restore the freedoms guaranteed by our Constitution," he said.

Romney unpopular with some GOP activists

In an interview at the convention, Lt. Gov. Spencer Cox noted that Utah Gov. Gary Herbert lost the party's nomination two years ago because of the same anger roiling among the delegates.

"We lost by 10 points at convention, it was 55-45, and then we won by 44 points in the primary," said Cox, who was on the ticket with Herbert. "Sometimes the 4,000 delegates that are here aren't exactly representative of the 650,000 Republicans that are in this state. It's a very small percentage, people who tend to be excited about giving up a Saturday to come sit in a room for hours on end and talk about wonky things."

"I can tell you that Mitt Romney is still incredibly popular here in the state of Utah regardless of what happens today, and I anticipate that he'll have no problem in a primary," Cox said in an interview before the U.S. Senate voting began.

Though Trump is far more unpopular among Republicans here in Utah than in other red states — in part because of the more moderate stance of Utah Republicans and the Mormon Church on immigration — some Republican voters are still angry at Romney for criticizing the President's harsh rhetoric on immigrants and his crude commentary during the 2016 campaign.

"(Romney) did everything he could -- probably more than any man in America -- to get Hillary Clinton elected," said Ken Welch, a 54-year-old Salt Lake City Republican who stopped delegates in the hallway outside the stands at the Maverik Center arena (where delegates were voting) urging them to oppose Romney.

"He had national news conferences, and spoke on Fox News, to announce that Donald Trump was a fraud, he was a lousy business man. He's a 'Never Trumper,'" said Welch, an insurance salesman (who added that he would support any other US Senate candidates). "If he would have succeeded in bringing down Donald Trump, we most likely would have ended up with Hillary Clinton."

Romney and Trump ultimately reached a truce -- and Trump considered him for secretary of State. Trump has endorsed Romney in his Senate bid.

On the campaign trail in Utah, Romney has noted that he largely agrees with Trump on policy, but does not condone Trump's harsh tone on immigration, his rapid-fire insults over Twitter, or his frequent attempts at character assassination as a governing style.

Kennedy praised Trump throughout his speech to delegates Saturday before the vote. Romney has been more circumspect -- going so far as to say that he is not ready to endorse the President's 2020 re-election campaign.

After the convention vote, Romney again pointed out that he has, for the most part, agreed with President on policy.

"In terms of the President's policies, in this first year, we're pretty much on the same page," Romney said. "He did not pursue the 45% tariff on all foreign goods that I think would have been problematic for the economy; but he has put in place a tax proposal that is going to get the economy going better; he's been a person who has de-regulated a good portion of the economy -- a good thing. And of course, he made a decision on Bear's Ears and the Grand Staircase that I think was the right decision."

But Romney went on to warn that he would continue to call out the President when warranted.

"If he says things that I think are off the mark in a serious way, I'll point that out," Romney continued. "I think the President recognizes that I'm someone who calls them like I see them, and I appreciate that as well."

Romney said he did not know much about Kennedy's record, but he noted that they both agreed with the Utah GOP platform. He pointed out, however, that he has more experience working with lawmakers in Washington.

"I think my experience in the business world; in the not-for-profit world with the Olympics and as governor, and also as a nominee for president in our party, gives me the associations that I have in Washington to get things done," he said. "Everybody can talk a good game. We're all for the same policies, but who can actually get the job done? And I hope to get the job done for the people of Utah."

If he wins the primary, Romney will likely face Jenny Wilson, who has attempted to frame the former Massachusetts governor as an interloper who does not understand the needs of Utah, as well as a political insider who does not represent the grassroots.

"It's time we elect a new generation of Utah leaders who will put our interests ahead of their own ambitions," she said in a statement before the GOP convention on Saturday.

Romney has owned a home in Utah since he moved here to serve as chief executive officer of the Salt Lake City Olympic Committee before the 2002 Olympic games. He became a registered voter here in 2014, and he and his wife Ann now live in Holladay next to their son Josh and his family.