MANCHESTER, New Hampshire (CNN) -- Sens. Hillary Clinton and John McCain will carry much-needed boosts from New Hampshire into upcoming contests in the 2008 presidential campaign.
Sen. John McCain repeated the success he had in New Hampshire in the 2000 campaign.
Clinton, coming off a disappointing third-place finish in Iowa, rebounded to first place, overcoming rival Sen. Barack Obama in the state's Democratic primary.
The win breathes new life into a Democratic campaign that turns its focus to contests in Nevada and South Carolina -- and could stretch past "Super Tuesday" February 5.
Supporters at Clinton's headquarters chanted "comeback kid" as the results arrived.
Romney said he was ready to move on to the next GOP contest -- in Michigan, where his father was governor in the 1960s.
The results are a resurgence for McCain, the Arizona senator whose campaign was all but written off this summer. What do the results mean? »
Clinton and McCain embraced their comeback positions in addressing supporters Tuesday night. Watch sights and sounds from New Hampshire, as it happened »
"Over the last week, I listened to you, and in the process I found my own voice," Clinton said to a crowd of young supporters.
"Now together, let's give America the kind of comeback that New Hampshire has just given me."
McCain, a 71-year-old, four-term senator, was met by a crowd shouting, "Mac is back."
"I'm past the age when I can claim the noun 'kid,' no matter what adjective precedes it, but we sure showed them what a comeback looks like," he said.
McCain pinned his win on "one strategy" -- telling the people of New Hampshire what he believes. See a slideshow of the candidates' speeches »
"When the pundits declared us finished, I told them, 'I'm going to New Hampshire, where the voters don't let you make their decisions for them. I'm going to New Hampshire, and I'm going to tell people the truth,'" he said.
Women and older voters helped hand Clinton the Democratic win, according to exit polls. Watch pundits try to make sense of the results »
In Iowa, Clinton lost out to Obama among women 35 percent to 30 percent. In New Hampshire, however, 45 percent of female Democratic primary voters picked Clinton, compared with 36 percent who went for Obama.
Older voters also overwhelmingly outnumbered younger voters, a proportion that benefited Clinton. Sixty-seven percent of Democratic primary voters were over the age of 40, and they were breaking heavily for Clinton over Obama.
McCain overcame Romney, a former Massachusetts governor, to seal the win in New Hampshire.
Romney had led most polls in Iowa and New Hampshire before the votes there and held a 12-point lead in New Hampshire shortly before Christmas. He finished second, as he did in Iowa.
Romney won Saturday's Wyoming caucus.
Former Arkansas Gov. Mike Huckabee -- winner of the Iowa caucuses -- finished third in New Hampshire with 11 percent.
Voters who supported McCain and those who supported Romney differed significantly on what issues they believe are most important, exit polling showed.
Forty-six percent of those who supported McCain ranked the war in Iraq the most important. Meanwhile, voters who supported Romney overwhelmingly thought immigration was most important.
McCain has been a staunch supporter of the war in Iraq, but co-sponsored failed immigration legislation that angered many conservatives in his party. Romney has been taking a tough stance on immigration.
McCain bested Huckabee, a one-time Baptist minister, among New Hampshire voters who said a candidate's religious beliefs matter a great deal, according to CNN exit polls. Although Huckabee won overwhelmingly among those voters in Iowa, in New Hampshire, 35 percent went to McCain and 31 percent went to Huckabee.
The religious voters made up 14 percent of all Republican primary voters in New Hampshire -- much less than in Iowa.
Huckabee and Romney called McCain to congratulate him Tuesday night.
"I'll fight to be back in this state and others," Romney told supporters.
Huckabee, who earlier said a third-place finish would be "huge" for him, also promised to return to New Hampshire.
"After we secure the nomination, we've got to come back here and make sure we carry New Hampshire."
Obama, the junior senator from Illinois, congratulated Clinton and praised "all the candidates in this race" as "patriots who serve this country honorably."
But Obama assailed critics who he said doubted his campaign and said the record numbers of voters in Iowa and New Hampshire showed "there is something happening in America."
"For most of this campaign, we were far behind," he said. "We always knew our climb would be steep. But in record numbers, you came out and you spoke up for change."
Former Sen. John Edwards of North Carolina painted himself as the candidate of the voiceless after tracking a distant third in the Democratic primary.
Noting that there are "two states down, 48 states to go" in primary and caucus voting, the 2004 vice presidential nominee said only 1 percent of Americans had voted so far and that the other "99 percent deserve to be heard."
With 95 percent of precincts counted, Clinton had 39 percent of the vote to Iowa caucus winner Obama's 37 percent. Edwards had 17 percent. New Mexico Gov. Bill Richardson had 5 percent, and Ohio Rep. Dennis Kucinich had 1 percent.
With 96 percent of Republican precincts reporting, McCain had 37 percent of the vote to Romney's 32 percent. Former New York Mayor Rudy Giuliani had 9 percent, and Texas Rep. Ron Paul had 8 percent. Former Tennessee Sen. Fred Thompson received 1 percent of the vote. E-mail to a friend
CNN's Bill Schneider, Paul Steinhauser and Anastasia Diakides contributed to this report.