MANCHESTER, New Hampshire (CNN) -- U.S. Senator Hillary Clinton claimed a come-from-behind victory in New Hampshire's Democratic primary late Tuesday, edging out her Senate colleague, Barack Obama, after placing third in the Iowa caucuses.

Flanked by her husband, former President Bill Clinton, and daughter Chelsea, the New York senator told supporters she "found her own voice" in the five days since her third-place showing in Iowa, and promised them "we are in it for the long run."

"Now let's give America the kind of comeback that New Hampshire has just given me," she said.

Solid support from registered Democrats and women were crucial, results from exit polls suggest.

With 89 percent of precincts reporting, CNN projected Clinton the winner of the first-in-the-nation primary with 39 percent of the vote to Obama's 37.

Self-styled independents, who made up 43 percent of all voters polled, said they voted for Obama by a margin of 43 percent to 31 percent for Clinton.

But Clinton was ahead of Obama 45 percent to 34 percent among those who said they were registered Democrats.

Don't Miss

Those voters made up a majority -- 54 percent -- of all those respondents. Clinton also claimed the majority of women's votes, according to the polling.

That's in contrast to last week's Iowa caucuses, in which Obama surprised observers by stealing the female vote from Clinton. According to the exit polls, Clinton had a sizable lead over Obama among women, 47 percent to 34 percent. Analysts say that shift was crucial to the Clinton turnaround.

"If I had a single word, the word would be 'women,' " said CNN political analyst Bill Schneider. "She got the women back."

Meanwhile, U.S. Senator John McCain won the New Hampshire state primary in the race to become the Republican party's presidential candidate.

Despite New Hampshire's comparatively small population, the state carries an importance disproportionate to that size as it is the first state to go to the polls -- rather than caucus -- in the presidential election race.

In exit polls, voters from both parties rated the economy their top issue and the war in Iraq second -- but concerns about illegal immigration rated third among Republicans, while Democrats said health care was just behind Iraq.

In his victory speech Tuesday, McCain made joking reference to a similar speech by Bill Clinton, who coined the term "Comeback Kid" when he did well in New Hampshire as a presidential hopeful.

Don't Miss

"I am past the age when I can claim the noun kid ... but tonight we sure showed them what a comeback looks like," he said.

As supporters chanted "Mac is back," McCain said his victory was down to telling the truth even if it was not what voters wanted to hear.

Over the summer many had written off McCain, who had alienated the party's conservative base with his support of a controversial immigration reform bill, and poor fund-raising prompted him to shake up his staff.

Ballots ran low in some polling stations six hours before the last polling stations closed at 8 p.m., indicating a larger-than-expected turnout, representatives of New Hampshire's secretary of state said.

I-Report

With 64 percent of Republican precincts reporting, McCain had 37 percent of the vote. Former Massachusetts Governor Mitt Romney was second with 32 percent, and former Arkansas Governor Mike Huckabee, the winner of last week's Iowa GOP caucuses followed with 11 percent.

Obama was aiming to build on his success in last week's Iowa caucus, where he came first.

Edwards, finishing third in the Democratic race, said his campaign will continue into the remaining 48 states still to vote.

"I intend to be the nominee of my party... I am in this race until we have actually restored the American Dream, and strengthened and restored the middle class of America. I ask all of you... to join us in this grassroots campaign to create the kind of America all of us believe in."

Bill Richardson, Dennis Kucinich and Mike Gravel are also competing for the Democratic nomination.

Among the Republicans, McCain and Romney were the frontrunners, with both seeking a morale-boosting victory after rival Mike Huckabee claimed victory in Iowa. Fred Thompson, Ron Paul and Duncan Hunter also remain in the Republican race.

Romney said Tuesday night: "I'll fight to be back here in November" -- a reference to the presidential election date.

He also said he was looking forward to next week's Michigan primary. He said Michigan, under years of Democratic leadership, has seen "taxes ... going up and jobs ... going out."

Huckabee won the Iowa caucus with extensive support from evangelical Christian voters, but was never expected to do as well in New Hampshire.

"A few weeks ago, we were way back in sixth place and nobody thought we would even be contenders in New Hampshire," he said. "If there's any sadness tonight," he said, "it's not because of where we finished because, whew, we're pretty happy about that."

Former Tennessee Senator Thompson has nearly abandoned New Hampshire, while former New York Mayor Giuliani has concentrated his attention on later primaries.

Giuliani said: "This is just the beginning... We've got a lot of places to carry on this fight and we're going to prevail."

A strong performance in New Hampshire can give a candidate valuable momentum, enabling them to rally supporters and raise extra campaign funds going forward to the crucial "Super Tuesday" primaries on February 5 when voters in 24 states will participate in primary elections.

By contrast, a poor showing in the "Granite State" can spell the end for a candidate's White House chances.

Despite the millions spent by candidates from all parties over the past few weeks and months, the first results in New Hampshire came from two tiny hamlets, just after midnight and hours before the rest of the state's polling places opened.

In Dixville Notch, a hamlet of about 75 near the Canadian border, Arizona senator McCain won the Republican primary with four votes, while Obama, a senator for Illinois, won seven votes in the Democratic contest.

The two also won in midnight voting in Hart's Location, population 42.

McCain won the state's primary during his first White House bid eight years ago but eventually lost out to U.S. President George W. Bush for the Republican nomination.

Ron Paul, an anti-war Texas congressman and onetime Libertarian Party presidential nominee, said: "We are on the right track." He had picked up about 8 percent of the vote.E-mail to a friend