MANCHESTER, N.H. -- Hillary Clinton surged back from a distant second in weekend polls to stun rising star Barack Obama and win New Hampshire's Democratic presidential primary on Tuesday, while Sen. John McCain of Arizona routed former Massachusetts Gov. Mitt Romney on the Republican side.
The Associated Press projected Clinton the winner shortly after 10-30 p.m. EST. With 67 percent of precincts reporting, the New York senator had 39 percent to Obama's 36 percent.
Pre-primary polls had found that Clinton would lose big, perhaps by double digits. But she ran strong Tuesday among women and voters over 40, while the Illinois senator failed to get the overwhelming backing from younger voters who helped propel him to victory last Thursday in Iowa.
The Clinton comeback - reminiscent of her husband's rebound in the 1992 New Hampshire primary, when he climbed back to a second-place finish and went on to win the White House - sets up a coast-to-coast duel for the Democratic nomination that's likely to go on until 23 states vote on Feb. 5.
Never miss a local story.
Obama congratulated Clinton on her victory shortly before 11 p.m. and vowed to keep fighting. To cheering supporters, he said: " You can be the new majority who can lead this nation out of a long political darkness."
Clinton still faces some major hurdles: The next Democratic stops are Nevada on Jan. 19 and South Carolina a week later. Obama has clear advantages in both states; the powerful Culinary Workers union reportedly is ready to back him in Nevada, and about half the South Carolina electorate is African-American.
But after that, Obama and Clinton will engage in political combat across the nation - when organization and money could make a difference - and each candidate has a deep war chest.
Tuesday's result was less encouraging for former North Carolina Sen. John Edwards, who finished a distant third with 17 percent, despite having campaigned hard in New Hampshire, including a final 36-hour marathon. Edwards vowed to continue his campaign regardless, hoping to mount a comeback in South Carolina, his native state.
Among Republicans, McCain made his own kind of comeback. His campaign, all but dead just months ago, was ahead of Romney by 6 percentage points with 63 percent of precincts reporting.
His victory left the GOP race more unsettled than ever. McCain, who eight years ago launched his bid for the White House with a smashing victory here, hoped to all but knock out Romney, who governed the state next door until a year ago and has a home here.
As cheering supporters chanted, "Mac is back! Mac is back!," McCain relished his rebound to victory after having been widely counted out when his campaign broke down last summer: "My friends, I'm past the age when I can proclaim myself a kid no matter what adjective precedes it. But tonight we sure showed `em what a comeback looks like."
Romney also finished second last week in Iowa after leading polls there all year, only to fall short behind former Arkansas Gov. Mike Huckabee, who mobilized Christian evangelicals.
"Well, another silver. I'd rather have a gold, but I got another silver," Romney told supporters in New Hampshire Tuesday night. He congratulated McCain "for running a first-class race. Give him a round of applause."
McCain pinpointed the beginning of his remarkable comeback - "a very slow snowball," he called it - to a debate just after Labor Day in New Hampshire, when he gave a moving, emotional answer to a young woman who stood to ask if her brother's death in Iraq had been worth it.
"That was quite a moment, and one I'll never forget. . . . It was when people first really started looking at the candidates," McCain told reporters recently.
He then embarked on a series of town hall meetings, 101 in all (he held 114 in 2000), where he took questions from all comers.
"The undecideds started showing up and giving me another look," McCain said. "I've always said I can out-campaign most people. And with another burst of ego, I can relate to people at a town hall meeting."
McCain also relied on externals breaking his way, usually a dicey proposition in a political campaign. But he lucked out: Romney collapsed in Iowa in the face of Huckabee's surge, denting his front-running aura. And the troop surge in Iraq, which McCain had urged for years, began yielding military results.
"A lot of good things had to happen, particularly the war," McCain said.
McCain's win in New Hampshire could make the final blow against Romney imminent, since the GOP hopefuls will next move on to a Tuesday contest in Michigan, where Romney's father was an almost mythical figure as governor in the 1960s.
But McCain also scored a decisive 2000 triumph in Michigan and has the potential to stagger Romney further, and Huckabee has a strong base of support among evangelical Christians there.
Huckabee, though, was unable to gain any momentum in New Hampshire from his big Iowa win and wound up with about 12 percent of the vote, topping former New York Mayor Rudy Giuliani, who got 9 percent and Texas Rep. Ron Paul, at 8 percent.
Giuliani, banking on generating momentum beginning Jan. 29 in Florida, told supporters here, "It is a wide open race."