Mitt Romney won New Hampshire’s Republican presidential primary on Tuesday, giving the former Massachusetts governor a sweep of the first two critical tests in the GOP nominating contest.

Based on exit poll results, Romney received a vote percentage in the mid- to high-30s. Rep. Ron Paul (Tex.) finished second in the mid-20s, followed by former Utah governor Jon Huntsman in the high-teens.

Romney quickly moved to consolidate his support by delivering an impassioned victory speech that focused not on his primary opponents but squarely on President Obama. He appealed to voters in South Carolina, who will go to the polls in 11 days, to propel him to the nomination and “make sure 2012 is the year [Obama] runs out of time.”

Speaking to supporters in his campaign headquarters in Manchester, N.H., just half an hour after the polls closed, Romney assailed Obama for failing to live up to the “lofty promises made by a hopeful candidate” in 2008.

“Today we’re faced with the disappointing record of a failed president,” he said. “The last three years have had a lot of change, but they haven’t offered much hope.” Adding a shot aimed directly at Obama’s recent jobs tour, Romney added: “The middle class has been crushed. Twenty four million of our fellow Americans are still out of work, struggling to find work or have stopped looking.”

Former House speaker Newt Gingrich (Ga.) and former Pennsylvania governor Rick Santorum, who had narrowly lost to Romney in the Iowa caucuses last week, finished farther back.

Texas Gov. Rick Perry didn’t campaign in New Hampshire so he could focus on South Carolina, which could represent a last chance for him and several others if they cannot blunt Romney’s momentum in a state where his conservative credentials could face their stiffest test.

Vowing to press on, Paul addressed his supporters in Manchester, saying Romney “certainly had a clearcut victory, but we’re nibbling at his heels.”

In his victory remarks, Romney lashed out at Obama and his Republican rivals, who in recent days criticized his record as a venture capitalist, portraying him as a “vulture” who preyed on troubled companies.

“President Obama wants to put free enterprise on trial. In the last few days, we have seen some desperate Republicans join forces with him. This is such a mistake for our party and for our nation,” Romney declared. “This country already has a leader who divides us with the bitter politics of envy. We must offer an alternative vision. I stand ready to lead us down a different path, where we are lifted up by our desire to succeed, not dragged down by a resentment of success.”

Romney’s victory was expected for a candidate who has campaigned aggressively in this state that borders his home turf. After eking out a narrow win in last week’s Iowa caucuses, Romney hoped a bigger victory here could ramp up his momentum heading into the South Carolina.

In New Hampshire, exit polls showed more independents than in Republican contests in 2008, 2000 or 1996. By party identification, nearly half of early voters say they identify as independents, with more than four in 10 of all voters officially registered as undeclared. And six in 10 voters identified the economy as the most important issue, even in a state whose 5.2 percent unemployment rate is fourth lowest in that nation.

Romney earned strong support from the Republican base, according to the exit polls, winning nearly half of self-identified Republicans, up significantly from four years ago. He had a 2-to-1 edge over his closest rivals among voters who identified the economy as their chief concern.

Romney pledged to boost the economy, hammering Obama’s “misguided policies and broken promises of the last three years – and the failed leadership of one man.”

Obama “has run out of ideas,” Romney added. “Now, he’s running out of excuses.”

Yet the frontrunner continued to show weakness with “very conservative” voters, among whom Romney and Santorum ran about evenly.

In campaign appearances and television interviews, Gingrich and Perry took aim at Romney’s role as an executive at Bain Capital, a private equity investment firm, during the 1980s and ’90s.

Gingrich suggested that Romney had “undermined capitalism” while implementing Bain’s “indefensible” business model. Perry, campaigning in South Carolina, likened Romney’s firm to “vultures ... waiting for a company to get sick.”

Huntsman, who has staked his longshot bid for the Republican presidential nomination on a respectable showing in New Hampshire, belittled Romney as a “homeboy” who owed his lead in the polls to his New England ties and his 2003-2007 stint as governor of neighboring Massachusetts.

Hours before polling places closed, a large political action committee affiliated with GOP political guru Karl Rove gave Romney a boost by defending his chances of becoming the Republican nominee. But the American Crossroads super PAC stopped short of endorsing the front-runner.

Romney appeared calm and confident as he greeted voters on Tuesday, even as fallout continued from a spontaneous comment he made Monday to a group of business leaders.

As he held up a baby outside Webster Middle School here, someone shouted repeatedly: “Are you going to fire the baby?” It was a reference to Romney’s remark that he liked being able to “fire people who provide services to me.”

The candidate was talking about health insurers that don’t provide adequate care. But in the final campaign rush of the New Hampshire primary, his opponents tried to use the phrase to strengthen their depiction of Romney as a corporate predator who sought profits at the expense of workers.

“Governor Romney enjoys firing people; I enjoy creating jobs,” Huntsman. “It may be that he’s slightly out of touch with the economic reality playing out in America right now, and that’s a dangerous place to be.”

Gingrich went further, criticizing the type of business Romney engaged in. “Look, I’m for capitalism,” Gingrich said on NBC’s “Today” show. “But if somebody comes in, takes all the money out of your company and then leaves you bankrupt while they go off with millions, that’s not traditional capitalism.”

He said on Bloomberg Television, “The question is whether or not these companies were being manipulated by the guys who invest to drain them of their money, leaving behind people who were unemployed.” He added: “Show me somebody who has consistently made money while losing money for workers, and I’ll show you someone who has undermined capitalism.... That’s an indefensible model.”

Perry told a town hall meeting in Fort Mill, S.C., that firms such as Bain Capital were “just vultures” that “loot” other companies. “They’re vultures that are sitting out there on the tree limb, waiting for a company to get sick,” Politico quoted Perry as saying. “And then they swoop in, they eat the carcass, they leave with that and they leave the skeleton.”

A Romney spokeswoman, Andrea Saul, told Politico that Gingrich and Perry “have resorted to desperate attacks on a subject they don’t understand.” Saul said such “attacks on free enterprise” were expected from President Obama and leftist allies, “not from so-called ‘fiscal conservatives.’ ” Gingrich and Perry “seem to think that running against the private sector is the way to revive their floundering campaigns,” she said.

Romney did not respond directly to the heckler who asked whether he was going to “fire the baby.” But as the long-awaited voting got underway, he was not the only one to face hostility from some of New Hampshire’s notoriously independent voters, or the political junkies who migrate to the state for the primary every four years.

Gingrich, at the same polling station, found himself shouted down by a crowd that included many supporters of Obama. Both Romney and Gingrich were overwhelmed by the crush of reporters standing by to document the mayhem.

Romney spent much of Monday explaining and defending his role as co-founder and chief executive of Bain Capital, which invested in start-ups such as Staples, an office supplies superstore, but also oversaw large-scale job losses through leveraged buyouts and restructuring.

“Free enterprise will be on trial,” Romney told reporters in Hudson. “I thought it was going to came from the president, from the Democrats on the left, but instead it’s coming from Speaker Gingrich and apparently others. And that’s just part of the process. I’m not worried about that. I’ve got broad shoulders.”

Romney came under siege in a debate Sunday over his work at Bain, and his comment Monday seemed to give his opponents an opening to try to turn his greatest asset — that he would be uniquely skilled at creating jobs and turning around the nation’s economy — into a liability. It also provided evidence for those trying to cast Romney as out of touch with the struggles of working Americans.

The battle over Bain is certain to intensify as the race moves to South Carolina, where independent groups that support Romney and Gingrich are planning multimillion-dollar TV ad blitzes.

It’s a fight that Gingrich, in particular, is eager to have.

“It’s a legitimate question about exactly what happened: Where did the money go? Who got the money? What happened to the people involved?” he told reporters. “He’s the one who went around and said he has 20 years’ experience — fine. Now let’s talk about the 20 years’ experience.”

Nakamura reported from Washington. Staff writers Dan Balz, Amy Gardner and Rosalind S. Helderman in New Hampshire and Jon Cohen in Washington contributed to this report.