Utah Lt. Gov. Spencer Cox won the Republican nomination for governor Monday, fending off a challenge from former U.S. Ambassador Jon Huntsman Jr.

Cox captured a narrow lead with 36.4 percent of the vote over Huntsman’s 34.6 percent, The Associated Press reported on Monday.

Cox’s win in the June 30 primary gives him a heavy chance of victory in the conservative state come November.

FILE - Utah Lt. Gov. Spencer Cox speaks during the daily briefing on the state's efforts to fight COVID-19, June 25, 2020, at the Utah State Capitol, in Salt Lake City. (AP Photo/Rick Bowmer, File)

FILE - Utah Lt. Gov. Spencer Cox speaks during the daily briefing on the state's efforts to fight COVID-19, June 25, 2020, at the Utah State Capitol, in Salt Lake City. (AP Photo/Rick Bowmer, File)

Cox benefited from his current incumbency as lieutenant governor and was endorsed by Republican Gov. Gary Herbert, who is not seeking reelection. Huntsman had a lot of name recognition in the state, where he served as governor from 2005 to 2009. He also served as U.S. Ambassador to China under President Barack Obama and ambassador to Russia under President Trump from 2017 to 2019, before leaving to mount his gubernatorial campaign.

Cox has previously been critical of President Trump but says he supports him. In January, Cox said he doesn’t like the president’s divisive style but lauded him for taking on Chinese trade practices. “I think we need a governor that will be honest about that,” he said.

Cox’s leadership role in responding to the state’s coronavirus pandemic boosted his visibility. The election was conducted entirely by mail, and Huntsman himself contracted the disease in the midst of his primary campaign.

JON HUNTSMAN, NOW RUNNING FOR GOVERNOR OF UTAH, SAYS HE'S TESTED POSITIVE FOR CORONAVIRUS 

"The next four years will be critically important to Utah’s future," Cox said in a statement Monday, referring to the rebuilding of the state's economy hit hard by the pandemic and growing rural as well as urban parts of the state.

Huntsman, 60, has one of the most well-known names in Utah, where buildings named for his billionaire industrialist and philanthropist father Jon Huntsman Sr. Huntsman's daughter Abby Huntsman left her spot on “The View” in January to help run her father’s campaign.

Cox, 44, is a political newcomer by comparison, having been first elected to statewide office in 2012 and named the state’s second-in-command the following year.

Cox referred to himself as a “farm kid,” a reflection of how he leaned on his rural roots during the campaign and used his head start to cross the state, stopping at nearly every small town before the coronavirus hit.

The race saw an unusual number of liberal-leaning and independent voters crossing party lines and registering as Republicans to vote in the primary, with many saying it was the only way to have a voice in the state’s politics dominated by the GOP. Both Huntsman and Cox were seen as more moderate candidates.

CLICK HERE TO GET THE FOX NEWS APP

The GOP candidate will run against Democratic law professor Chris Peterson in November.

The Associated Press contributed to this report.