Former Utah governor Jon Huntsman abandoned his quest for the presidency Monday morning with an endorsement of former Massachusetts governor Mitt Romney and an unexpectedly sharp condemnation of the “toxic” tone that the Republican primary battle has taken.

“This race has degenerated into an onslaught of negative and personal attacks not worthy of the American people and not worthy of this critical time in American history,” Huntsman said in a news conference in which he was flanked by his wife, children, father and South Carolina supporters.

Huntsman did not name names in aiming criticism at his rivals, but he did take a shot at President Obama for engaging in what Huntsman called “class warfare” and said it contributed to divisiveness in American politics. But Huntsman, who often talked on the campaign trail about rebuilding trust in the political process, made clear that he thinks the GOP race has taken an ugly turn.

Huntsman’s move comes less than a week after he placed a weak third in the New Hampshire primary. He had staked his entire candidacy on a strong finish there. Despite the outcome, he had vowed to take his campaign to South Carolina, calling his finish a “ticket to ride” in the upcoming contest, despite the long odds.

By Sunday, however, he had concluded that the better course was to bow out of the race, the officials said.

“There was no sense standing in the way of Romney,” one Huntsman adviser said. “Every vote we took in South Carolina and Florida was from him.”

Romney is battling to win the Palmetto State primary, which will be held Saturday, and a victory could effectively end the nomination fight after only three contests. Romney won the Iowa caucuses by just eight votes but cruised to an impressive victory in New Hampshire.

Huntsman’s decision to leave the contest and support Romney should help the former Massachusetts governor in South Carolina, as he will be the lone candidate making a direct pitch to the establishment wing of the GOP.

The rest of the field — former House speaker Newt Gingrich (Ga.), former senator Rick Santor­um (Pa.) and Texas Gov. Rick Perry — are appealing to the party’s most conservative voters. Rep. Ron Paul (Tex.) has his own constituency, which is expected to continue to deliver votes for him.

Santorum won the endorsement of a group of evangelical Christian leaders over the weekend, and he hopes it will help coalesce the party’s conservative base around his candidacy. But neither Gingrich nor Perry is backing off. A splintered conservative vote is Romney’s path to victory in a primary that has supported the eventual nominee in every Republican presidential race since 1980.

The remaining candidates will debate in Myrtle Beach on Monday at 9 p.m. in a forum that will be aired on Fox News. They will square off again Thursday at 8 p.m. in Charleston, S.C., in an event to be aired on CNN.

Huntsman informed his senior staff of his decision Sunday night after discussing it with his family. According to one official, they concluded that, despite what he believed was some momentum from his third-place finish in New Hampshire, his continuation in the race would only hinder Romney’s candidacy and that it was best to get out now rather than take votes away from the GOP front-runner.

Huntsman’s decision to drop out was conveyed to the Romney campaign in a telephone call Sunday night from John Weaver, the architect of the Huntsman campaign, to Stuart Stevens, the chief strategist on Romney’s team. According to an official, they were caught “totally by surprise.”

Huntsman joined the race in June, just weeks after returning from China, where he had served as U.S. ambassador for the Obama administration. His entry brought considerable media attention.

Obama advisers considered him a potentially strong general-election candidate, but winning the nomination was always a long shot because of his late entry and his difficulty finding space in the crowded GOP field. From the start his service as Obama’s envoy to China created resistance to his bid among many Republicans.

Huntsman’s record as governor included conservative and moderate elements, but he never found a constituency upon which to base his campaign. As a candidate, he seemed out of step with a party that had shifted sharply to the right while he was in Beijing.

His campaign got off to an awkward start when he announced in the shadow of the Statue of Liberty, attempting to mimic Ronald Reagan’s use of the symbolic setting during the 1980 general-election campaign. But the event lacked a sharp focus and set a tone for what was to come. Huntsman did not shine in debates, which have proved extraordinarily important. A reference to a Nirvana song during one of the early forums fell flat, leaving many in the political community wondering to whom he was trying to appeal.

Huntsman comes from a wealthy family but struggled to raise money for his bid. A super PAC that had the financial support of his father spent considerable money in New Hampshire, but his campaign there never achieved the kind of support he needed to become a strong contender.

Like the other candidates, he was hoping to become the alternative to Romney, but in choosing New Hampshire he was fighting Romney on what was essentially the former Massachusetts governor’s home turf. Huntsman was drawn to the Granite State by the fact that independents play a sizable role in the primary.

Last Tuesday, he captured 22 percent of the independent vote there but still trailed Romney and Paul. He won 10 percent of those who identified themselves as Republicans, a fatal flaw for any candidate vying for the nomination.

There were bright spots in his campaign, the most obvious being the accolades for his three oldest daughters, who billed themselves as the “Jon 2012 girls” and who became an Internet phenomenon after producing a video mocking a strange political ad for the candidacy of Herman Cain.

Huntsman is the second candidate to quit since voting began in Iowa on Jan. 3. Rep. Michele Bachmann (Minn.) stepped aside after a disappointing finish there.

Cillizza reported from Washington.