Media playback is unsupported on your device Media caption Mitt Romney: "We will make 2012 the year Obama runs out of time"

US Republican presidential hopeful Mitt Romney has taken another stride towards his party's nomination after a solid victory in New Hampshire's primary.

The former Massachusetts governor was home and dry on nearly 40% of the vote, with most results counted.

Texas Congressman Ron Paul was second on about 23% and former Utah Governor Jon Huntsman third on almost 17%.

The eventual Republican nominee will take on President Barack Obama for the White House in November's elections.

Primaries and caucuses will be held in every US state over the next few months to vote on a Republican candidate before the eventual winner is crowned at the party convention in August.

Nearly-complete results from Tuesday's New Hampshire vote showed Rick Santorum and Newt Gingrich tussling for fourth place with less than 10% each, while Rick Perry had under 1% of the vote.

New Hampshire primary result Source: AP

See the latest delegate count Romney 39.3% Paul 22.9% Huntsman 16.9% Gingrich 9.4% Santorum 9.4% Perry 0.7% 301 of 301 precincts reporting

All six contenders have vowed to fight on to the primary in South Carolina on 21 January.

But it is Mr Romney, narrowly declared the winner of Iowa's caucuses last week, who is viewed as having the strongest momentum heading into the next battleground state.

Within 20 minutes of polls closing, he took to the stage to declare victory and attack President Obama's economic record.

"The president has run out of ideas," he told supporters. "Now, he's running out of excuses.

"And tonight, we are asking the good people of South Carolina to join the citizens of New Hampshire and make 2012 the year he runs out of time."

Ron Paul, who finished third in last week's Iowa caucuses, celebrated his latest result by telling cheering supporters: "I sort of have to chuckle when they describe you and me as dangerous. They're telling the truth because we are dangerous - to the status quo."

Mr Paul's younger following admires his small-government message, but his calls for withdrawing troops from Afghanistan and legalising drugs have put him outside the mainstream of his party.

Mr Huntsman, who was President Obama's first ambassador to China, had pinned his hopes on an upset in New Hampshire to boost a candidacy that has failed to excite many Republicans nationally.

Analysis Tonight's result was not pre-ordained but it was predictable. The next vote, in South Carolina is anything but. South Carolina could get very dirty. Romney's opponents might pull their punches in future. I doubt it, though. Already the attacks have started a debate among conservatives about whether some forms of capitalism are unacceptable or any attack on the free market is un-American. The message - that capitalism, unfettered, red in tooth and claw, is always inherently good - may be the creed, but that doesn't mean it is the easiest sell in these times of resentment against Wall Street and the establishment. Romney is right in one respect. The only winner is the White House, which is trying to paint him as an out-of-touch patrician who has made his pile on the backs of ordinary Americans. The longer this goes on, the longer that message has to sink in. Read more of Mark's thoughts

The former governor, widely seen as the least conservative candidate, told supporters his third-place finish gave him "a ticket to ride'' to South Carolina, but he is considered a long-shot for the nomination.

Former Pennsylvania Senator Santorum, who courts the social conservative vote, could not build on his near-victory in Iowa, where he fell just eight votes short of Mr Romney.

Former House Speaker Gingrich also failed to get his once-soaring candidacy back on track.

Like Mr Perry, who skipped campaigning in New Hampshire, they are pinning their hopes on stopping Mr Romney's momentum in South Carolina.

But correspondents say if the conservative vote continues to fracture between the three of them, Mr Romney could find his march to the nomination almost guaranteed.

In Tuesday's victory speech, Mr Romney, who built a fortune as a venture capitalist, took aim at those rivals who launched fierce eve-of-primary attacks portraying him as a predatory corporate raider.

"President Obama wants to put free enterprise on trial, and in the last few days we've seen some desperate Republicans join forces with him. This is such a mistake for our party and our nation," he said.

Other contenders had seized on a remark the tycoon made on Monday while discussing health insurance coverage, when he said: "I like being able to fire people who provide services to me."

Victory may not be so easy for Mr Romney in South Carolina, with its large bloc of evangelical voters, although an opinion poll last week showed him leading in that state.

Media playback is unsupported on your device Media caption Ron Paul: "We are dangerous to the status quo of this country"

Despite a well-funded campaign and backing from his party's establishment, Mr Romney has struggled to rally the majority of Republicans behind his candidacy.

The multi-millionaire Mormon has been accused of being out-of-touch with ordinary voters and the core values of the party's influential conservative right-wing.

In his first presidential run in 2008, Mr Romney finished second in New Hampshire to John McCain, who ultimately won the Republican nomination. This time, he campaigned with Mr McCain's endorsement.

Analysts estimate about 250,000 Republican voters turned out to vote in New Hampshire.

President Obama is seeking re-election amid voter concern at the pace of economic recovery from the recession that started in 2007 during the White House tenure of George W Bush and ended in 2009.