Jon M. Huntsman Jr., the charismatic former Republican governor of Utah who appeared to put his presidential ambitions on hold when he became President Obama's ambassador to China, abruptly resigned his post Monday and appears likely to take a shot at ousting his boss.

Huntsman will leave Beijing on April 30, giving the administration just three months to fill a crucial diplomatic post and adding further intrigue to a crowded field of Republican presidential aspirants.

White House officials said they were miffed about Huntsman's shift and said late Monday that they doubt he could make a successful run at the presidency. The ambassador spent time during Chinese President Hu Jintao's recent visit with Obama, but gave them no indications that he was planning a possible run.

Huntsman's appointment had been widely praised, both for his expertise on China and foreign policy but also as a shrewd political move. Obama's top advisers had long viewed him as a potentially potent challenger in 2012, and sending him to Beijing seemed to successfully avoid that possibility. Moreover, it was a coup for a president looking to show a bipartisan side.

Addressing reporters Monday before the White House received the resignation letter, White House press secretary Robert Gibbs appeared to send Huntsman a warning.

"The president, and I think the American people, expect that somebody that holds the post of ambassador from the United States to China would dedicate their full energy and time to that position. And we believe that Ambassador Huntsman believes that as well," Gibbs said.

People close to Huntsman said Monday that the move marked a stunning reversal from his previous decision to wait on a White House bid until 2016. One friend described it as a "fairly massive change of heart."

But friends and advisers said he had been frustrated with his lack of influence in China after two years on the job and grew to view the potential Republican field as relatively weak.

One adviser said Huntsman made his final decision over the holidays, encouraged by political advisers and potential fundraisers who convinced him that he could win.

Advisers said Huntsman's backers assured him that he could overcome two perceived liabilities with conservative voters who hold sway in GOP primaries and caucuses - his Mormon faith and the fact that he worked for a Democratic president.

Advisers studied the 2008 candidacy of another Mormon, former Massachusetts governor Mitt Romney, and concluded his candidacy was hampered not by his religion but instead by a series of flip-flops on issues such as abortion that gave voters reason to question his authenticity.

Also, advisers said, Huntsman would be portrayed as having a far more distant relationship with the church than Romney. Huntsman can talk about a new law he signed in 2009 making it easier for people to buy drinks in bars.

Huntsman began laying his plans in private many months ago, spreading the word that he hoped to leave China and using multiple opportunities to forge connections with national political reporters.

Huntsman advisers said Monday that the former governor has been focused on his ambassadorial duties and has been detached from efforts by his supporters, which include forming a political action committee, HorizonPAC, that could be used to kick-start a campaign.

As far back as November 2009, when the White House press corps accompanied Obama on a trip to Beijing and Shanghai, Huntsman made himself unusually available for comment - so much so that he caught the attention of administration officials more accustomed to keeping reporters at bay and who prefer to control their media strategy.

When rumors first surfaced that Huntsman had purchased a home in the Kalorama neighborhood and was contemplating a presidential bid late last year, senior White House officials scoffed at the notion - and said they had not been given any inkling of the move by Huntsman himself. It wasn't until around the holidays that people inside the White House began to realize that he was seriously considering a run. A short time later, Huntsman finally "told several people in the White House that he would be coming back [to the U.S.] in the early part of this year," a senior administration official said.

He will be a difficult figure to replace. Fluent in Mandarin, with significant stature in the region, he has played an important role in U.S.-China policy as Obama has sought to make the United States more competitive and to build a business alliance with Beijing.

White House officials clearly have chosen to make sure conservative voters see Huntsman as someone who chose to work for the Democratic president.

"I couldn't be happier with the ambassador's service, and I'm sure he will be very successful in whatever endeavors he chooses in the future," Obama said when asked about Huntsman's possible presidential bid during a joint press conference with Hu last month. "And I'm sure that him having worked so well for me will be a great asset in any Republican primary."

Then over the weekend, William M. Daley, Obama's new chief of staff, poked fun at Huntsman during an off-the-record banquet.

"It's also good to see Jon Huntsman, our ambassador to China," Daley told the crowd, according to Politico. "Or as we call him around the White House: the Manchurian candidate. I want Jon to know that the president has no hard feelings. In fact, he just did an interview with the Tea Party Express saying how integral he has been to the success of the Obama administration."