MANCHESTER, N.H. - Mitt Romney won the first primary in the nation here Tuesday after weathering scathing attacks from rivals in the final days of campaigning, solidifying his claim to the Republican presidential nomination.

Libertarian Texas Rep. Ron Paul finished a strong second, and former Utah Gov. Jon Huntsman ran third, coming up short after staking his campaign on New Hampshire and its independent-minded voters.

The returns, combined with Romney's narrow win in Iowa's caucuses last week, made the former Massachusetts governor the first Republican candidate to win the first two voting states in a contested race since incumbent President Gerald R. Ford did it in 1976.

President Obama "has run out of ideas; now he is running out of excuses," Romney told chanting supporters about a half-hour after the polls closed, sounding as if he were delivering a convention acceptance speech.

"Americans know that our future is brighter and better than these troubled times," he said. "We still believe in the hope, the promise, and the dream of America."

Former House Speaker Newt Gingrich and former Pennsylvania Sen. Rick Santorum were battling for fourth place with more than 92 percent of the vote counted. Both were looking ahead to next week's South Carolina contest, with a more conservative electorate and a fresh chance to try to consolidate religious conservatives behind them as the main alternative to Romney.

"We have the opportunity to be the true conservative . . . who understands that the foundation of our country - our institutions that are crucial for us to be a successful nation - are families," Santorum told his supporters.

"This is step two of a long process," Gingrich said. "We have an opportunity, I think, to unify the country around a message of jobs, economic growth, and very dramatic change."

Texas Gov. Rick Perry, who did not stump here but was already in South Carolina, placed a far distant sixth.

In the days leading up to the New Hampshire primary, rivals stepped up attacks on Romney's record as onetime chief executive of the investment firm Bain Capital, accusing him of destroying communities by laying off thousands of workers from the companies that Bain purchased and flipped or reorganized.

"Is capitalism really about the ability of a handful of rich people to manipulate the lives of thousands of other people and walk off with the money?" Gingrich asked earlier Tuesday.

Gingrich and Perry led the charge. The attacks echoed a criticism that Obama and Democrats have been making of Romney as a heartless corporate raider who does not relate to average Americans.

Vice President Biden, during a video conference Tuesday night with Democratic New Hampshire supporters, unleashed some of the White House's harshest attacks yet on Romney.

"He thinks it's more important for the stockholders and the shareholders and the investors and the venture capital guys to do well than for those employees to be part of the bargain," Biden said.

A super PAC supporting Gingrich, called Winning Our Future, has bought a 27-minute documentary about Bain-caused layoffs and says it has reserved $3.4 million worth of TV time to attack Romney on the issue in South Carolina.

Romney did not help his cause in the last two days, when the multimillionaire first said he understood what it was like to fear a "pink slip," then told a business audience that he liked "being able to fire people." The latter was a reference to the importance of consumer choice among health-insurance companies.

"President Obama wants to put free enterprise on trial," Romney told supporters in declaring victory. "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. This country already has a leader who divides us with the bitter politics of envy; we must offer an alternative vision."

Paul said Tuesday night that he had called Romney to congratulate him, but he added, "We are nibbling at his heels." He told his supporters, as they chanted "President Paul!" that they had won "a victory for the cause of liberty tonight" and embraced the description of his movement by establishment Republicans and some media commentators as dangerous.

"They're right - we are dangerous to the status quo in this country," Paul, 76, said.

Registered independents made up 45 percent of the ballots in the primary, according to exit polls Tuesday. That was up from one-third in 2008. Paul captured the majority of them, the exit polls showed.

Huntsman declared to his supporters: "Third place is a ticket to ride. . . . We're in the hunt." He said he was going on to South Carolina.

To a certain extent, Romney was playing on his home field. He owns a sprawling vacation home on Lake Winnipesaukee, and, more important, led neighboring Massachusetts from 2003 to 2007. Many residents of the southern part of New Hampshire, the state's most populous, commute to Boston and get their news from the city's television stations. That proximity has benefited Massachusetts politicians of both parties in presidential primaries here.

Santorum, who came within eight votes of beating Romney in Iowa by appealing to social-conservative voters in a relentless shoe-leather campaign, found the going a little rougher in New Hampshire, a state with a tradition of fiscal conservatism combined with a "live and let live" approach to personal freedom.

At several town-hall meetings, hecklers pressed him on his opposition to same-sex marriage, for instance.

Luke Breen, 52, a financial analyst voting in Londonderry, said he would not support Santorum, saying the former senator seemed intolerant. He backed Huntsman.

"He seemed to be more worldly," Breen said. "I know gay people, and everyone has to have rights under our Constitution."

Voices From New Hampshire

Exit-poll results reveal differences between the Republican primary electorate in New Hampshire and caucus-goers in Iowa, and offer glimpses into voters' reasoning.

ELECTABILITY: Just over a third of voters in New Hampshire's Republican contest said their main

criterion was finding a candidate who can defeat President Obama. That was slightly more than those who said they wanted someone with the right experience or with strong moral character. A majority said they would be satisfied if Mitt Romney became

the party's nominee, while majorities said they

would be dissatisfied with Newt Gingrich, Ron Paul, or Rick Santorum.

THE ECONOMY: New Hampshire voters were more

apt than their Iowa counterparts to say the economy was the most important issue in deciding their vote. Among the 61 percent of voters who called it their

top issue, Romney more than doubled the support

of his nearest competitor. Romney and Paul split the votes of the 24 percent who called the federal deficit their top issue.

REGISTERED INDEPENDENTS: Voters who are registered independents or have not chosen a party made up 45 percent of voters this time around, compared

with 34 percent in 2008. These voters split between Romney and Paul, with Jon Huntsman third.

Unaffiliated voters in New Hampshire can take part in either party's primary.

ANGRY WITH OBAMA: Voters expressed deep opposition to the president. Overall, about 8 in 10

said they were dissatisfied with his policies, including

4 in 10 who described themselves as "angry."

RELIGION: Santorum and Gingrich failed to gain traction among their fellow Catholics; Romney carried the group with 45 percent of the vote and held a narrow edge among the state's evangelical voters.

AD WARS: Most voters said campaign advertising

was not a major factor in their vote. Voters were

divided on which candidate ran the most unfair campaign, with Romney and Gingrich near the top

of that list.

SOURCE: Associated Press. The exit poll was conducted for the AP and television networks by Edison Research as voters left polling places at 40 randomly selected sites in New Hampshire. Preliminary results include interviews with 2,760 voters and have a margin of sampling error of plus or minus 3 percentage points.

EndText

All the latest

in politics,

from what's happening in

the region to

the race for the White House, is at www.philly.com/

politicsEndText

Contact politics writer Thomas Fitzgerald at 215-854-2718, tfitzgerald@phillynews.com, or @tomfitzgerald on Twitter. Read his blog, "The Big Tent," at www.philly.com/BigTent.