MANCHESTER, N.H. – Mitt Romney swept to victory in the New Hampshire primary on Tuesday, turning back a ferocious assault from his Republican rivals who are working to slow his march to the Republican presidential nomination.
As the polls closed here, Mr. Romney, a former Massachusetts governor, was projected as the winner, becoming the first Republican candidate since 1976 to win the Iowa caucuses and New Hampshire primary. Representative Ron Paul of Texas and former Gov. Jon M. Huntsman Jr. of Utah were battling for second, according to surveys of voters leaving the polls.
Former Senator Rick Santorum of Pennsylvania and Newt Gingrich, the former House speaker, were trailing their Republican rivals, but already looking ahead to the next battle at the South Carolina primary on Jan. 21.
Mr. Romney, who owns a house in the state and spent four years as the governor of neighboring Massachusetts, was considered a favorite son here. The outcome was not only a measure of strength for Mr. Romney, but also a test for challengers seeking a strong performance to propel them into the South Carolina primary.
The New Hampshire contest was critical for Mr. Huntsman, who staked his entire candidacy on the state’s primary. Mr. Paul, whose supporters dominated others in waving signs and banners on street corners throughout the day, was competing with Mr. Huntsman for independent voters, allowed to vote in either primary, who joined Republicans in helping to select a nominee to challenge President Obama.
Mr. Santorum was hoping that his strong finish in Iowa, where he lost to Mr. Romney by eight votes, would give him additional momentum in New Hampshire. And Mr. Gingrich played down his expectations here on Tuesday and was looking ahead to his arrival in South Carolina on Wednesday.
The advantages for Mr. Romney here were abundant, but there was one obstacle that loomed larger than any of his Republican rivals: The inclination of New Hampshire to knock a front-runner down to size. He urged voters to make him the first candidate to win the Iowa caucuses and the New Hampshire primary.
“If I am president of the United States,” he said, “I will not forget New Hampshire.”
The preliminary results of surveys of voters leaving the polls found that nearly half of the primary voters on Tuesday identify themselves as independents — or something else — and half consider themselves Republican.
Half of the voters said they were conservative on most political matters, according to surveys of voters, while one-third said they were moderate. Only one in five voters said they were very conservative, and about one in 10 primary voters characterized themselves as liberal.
In interviews at polling places across the state on Tuesday, voters acknowledged a degree of uncertainty in their choices. Several Republican voters said they were unsure who could accomplish the ultimate goal of winning back the White House.
At the Rye Elementary School outside Portsmouth, Rose Cotronea, 50, said she had been mulling her choice for months with one thought in mind: “Someone’s got to get rid of Obama.”
She considered Mr. Romney (“He’s all right, but he feels too white bread”) and Mr. Gingrich (“He’s very bright, but I think he’ll be ripped to pieces”). When Monday dawned and she still had not come to a decision, Ms. Cotronea made a 45-minute drive to see Mr. Santorum speak in Somersville. The experience made up her mind.
“Just meeting him, seeing him speak, was really important,” said Ms. Cotronea, a psychotherapist. “These guys are so hypocritical. I want someone who is a man of character and values.”
She was not alone, according to the preliminary exit polls, which found that nearly half of New Hampshire voters had made up their minds within the last few days. Two in 10 said they were undecided until Primary Day.
Fiscal conservatives outnumbered social conservatives in New Hampshire’s primary, according to preliminary exit polls, with about two-thirds of voters saying they were conservative on taxes and spending. Only about four in 10 said they were conservative on social issues like gay marriage or abortion.
New Hampshire will also be among the critical battlegrounds in the general election. The independent voters who turned out on Tuesday for the Republican primary will be among those who are courted in the general election by Mr. Obama and the Republican nominee.
Kevin Kobylinski, a manager at a medical company, said he voted for Mr. Obama in 2008 when he lived in California. But he decided to vote for Mr. Romney in the Republican primary here, declaring, “I would like to see a competitive election.”
The New Hampshire secretary of state, William M. Gardner, predicted the turnout would be about 250,000. In 2008, when Senator John McCain of Arizona defeated Mr. Romney, turnout was 239,793. In 2000, the primary turnout was 238,206 when Mr. McCain defeated George W. Bush.
The margin of victory on Tuesday may offer only a partial picture of Mr. Romney’s standing as the contest immediately moved into the first Southern primary. The ferocious attacks on Mr. Romney’s business background, were poised to be dramatically amplified through television advertising, campaign rhetoric and aggressive political tactics in South Carolina.
Gov. Rick Perry of Texas, who abandoned his effort in New Hampshire to try to salvage his candidacy in South Carolina, argued at a campaign stop on Tuesday that corporate takeover firms like Mr. Romney’s Bain Capital were “vultures” that pick struggling companies clean and leave local communities to pick up the pieces.
“They’re vultures that are sitting out there on the tree limb waiting for the company to get sick,” Mr. Perry told a crowd in Fort Mill, S.C. “And then they swoop in, they eat the carcass, they leave with that, and they leave the skeleton.”
Even before the ballots were tallied in New Hampshire, the Romney campaign was turning its attention to South Carolina. His advisers were preparing a wave of advertising to respond to criticism of his business credentials from Mr. Perry and Mr. Gingrich. The ferocity of the attacks caught Mr. Romney off guard, aides acknowledged, particularly because they came from his fellow Republicans.
“Free enterprise will be on trial,” Mr. Romney said in the final hours of campaigning here. “I thought it was going to come from the president, from the Democrats, from the left, but instead it’s coming from Speaker Gingrich and apparently others. And, you know, that’s just part of the process. I’m not worried about that.”
But several influential Republicans, including Rush Limbaugh, said they were deeply concerned that the criticism amounted to an assault on American capitalism and called on Mr. Gingrich and others to cool their rhetoric.
“This is not the kind of stuff you want said by Republicans,” Mr. Limbaugh said on his daily radio show. “I mean, even the establishment Republicans don’t go after conservatives this way.”