SALT LAKE CITY — As a once enormously popular governor, scion of a prominent family and ambassador under two presidents to America's biggest global rivals, Jon Huntsman Jr. should be a political force to be reckoned with. But his comeback attempt fell short in a GOP primary as he contended with a crushing pandemic and a fresh-faced opponent.

Huntsman was narrowly beaten Monday by Lt. Gov. Spencer Cox, who had heightened visibility as he helped the state response to the coronavirus while also pitching himself as an earnest leader with rural Utah roots.

Huntsman, meanwhile, dealt with his own bout with the virus even as he faced conservative skepticism about his return and tried to capture voter attention during both the pandemic and national protests against racial injustice.

"Voters are upset, they're looking for change," said Tim Chambless, a political-science professor at the University of Utah. "In a sense, Jon Huntsman Jr. is a symbol of the past."

Cox's conservative brand, bolstered by a quirky-yet-wholesome Twitter feed, helped him capture more Republican voters in deep red parts of the state. His onetime criticism of President Donald Trump and sympathetic stance on LGBTQ rights meant he didn't scare off voters who make Utah a rare conservative bastion ambivalent about the president.

A very early start to his campaign also proved fortuitous in hindsight, allowing Cox, 44, to clock months visiting voters before the coronavirus hit.

Huntsman, meanwhile, was serving as U.S. ambassador in Russia under Trump as his main competitor motored into tiny towns in his bright green campaign bus.

Huntsman, 60, had just a few months before the pandemic hit to answer questions about why he was returning and what he would bring to the job after stepping down in 2009 to serve as ambassador to China under Democratic then-President Barack Obama.

"I don't think he was ever able to answer that question," Brigham Young University political science professor Chris Karpowitz said. "I think they had a plan to talk about future growth, managing growth and about international connections for the state ... everything was overtaken by the challenges of the pandemic."

Meanwhile, there were two other candidates in the race, and vocal Trump supporter Greg Hughes likely siphoned off votes from both front-runners by railing against coronavirus-related business shutdowns, said Jason Perry director of the Hinckley Institute of Politics at the University of Utah.

Cox, for his part, decried negative campaigning during his victory speech Tuesday, though he didn't mention Hughes' criticism specifically.

"We have too much of that in our country today. We are far too negative. We are far too divisive. Politics have become a religion to people. Politics have become so toxic, and we stand against that," he said.

The Huntsman campaign, meanwhile, tackled its challenges in part by encouraging people to register as Republicans so they could vote in the closed primary. The move tapped the wide popularity during his previous time as governor, when he oversaw a loosening of Utah's famously strict liquor laws and expressed early support for same-sex unions. Prominent Democrats encouraged party crossover, helping bolster the GOP rolls by more than 100,000 new members since January.

While Huntsman put in a strong showing, it wasn't quite enough for Republican voters like 45-year-old Trevor Irish, a therapist in rural Vernal, Utah. He felt like Cox had more energy and authenticity, though he acknowledges the pandemic did make the race feel more distant and muted Huntsman's message.

"I looked at him, I read his stuff. I just didn't get the vibe," he said. "I just felt like Spencer Cox had more oopf, saying, 'All right, this is what I'd accomplish.'"

Cox will likely have to answer hard questions about state spending and a recent surge of coronavirus cases during the general election against Democratic law professor Chris Peterson, though Utah has elected Republicans for decades.

The loss is a setback for Huntsman, though he still has plenty of political capital in the state where buildings bear the name he shares with his father, the late billionaire businessman and philanthropist. He hasn't said what he'll do next, only that he wants to contribute to the "good of our community."

"I do think his electoral future is cloudier than it was," Karopwitz said. "That doesn't mean he doesn't have an important role to play in thinking about the nation's future."