Powered by women voters and the Democratic faithful, Hillary Rodham Clinton rallied to a surprise victory Tuesday in the New Hampshire presidential primary, echoing the 1992 comeback that launched her husband to the White House.
Barack Obama, the winner five days ago in the Iowa caucuses, finished a close second, spinning their race forward to a showdown 11 days from now in Nevada.
In the Republican race, John McCain capped an improbable comeback by marching to victory over Mitt Romney and trouncing the victor in Iowa's caucuses, Mike Huckabee.
Independent voters, free to cast their ballots in either party's contest, made the difference for McCain but failed to push Obama past Clinton. She became the first female candidate ever to win a major-party primary and took a significant step toward becoming the nation's first female president.
Clinton also wrote her own chapter in the storied annals of New Hampshire politics. It was here that Bill Clinton, fighting exhaustion and allegations of womanizing and draft-dodging, rallied to a second-place finish to become the self-proclaimed "comeback kid."
"I felt like we all spoke from our hearts, and I am so gratified that you responded," a beaming Clinton told supporters. "Now together, let's give America the kind of comeback that New Hampshire has just given me."
Thanking New Hampshire for rescuing her campaign, she said, "Over the last week I listened to you, and in the process I found my own voice."
Sen. Clinton's travails -- while less personal than her husband's -- were no less formidable. After finishing third in last week's Iowa caucuses, she faced polls that gave Obama a double-digit New Hampshire lead, and a sense -- even among insiders -- that her campaign was verging on collapse.
Instead, the New York senator got 39% of the vote to 36% for Sen. Obama of Illinois. Former Sen. John Edwards of North Carolina received 17%, and New Mexico Gov. Bill Richardson 5%, with 96% of the precincts reporting.
Speaking to supporters, Obama acknowledged that "the battle ahead will be long," but said that nothing could stand in the way of "millions of voices calling for change."
On the Republican side, the New Hampshire results further scrambled the most unpredictable GOP contest in generations. The race heads to Michigan on Jan. 15, and South Carolina and Nevada on Jan. 19, with no clear front-runner.
Sen. McCain of Arizona had 37% to former Massachusetts Gov. Romney's 32% and former Arkansas Gov. Huckabee's 11%. Former New York Mayor Rudolph W. Giuliani had 9%, and Rep. Ron Paul of Texas had 8%.
"I'm past the age when I can claim the noun 'kid,' no matter what adjective proceeds it," McCain told cheering supporters at his headquarters hotel in Nashua. "But tonight, we sure showed them what a comeback looks like."
Scheduled five days after Iowa voted -- with Christmas lights still winking from some houses -- the New Hampshire primary underscored the rapid-fire nature of this dramatically telescoped nominating season. A month from now, more than half the states -- including California -- will have voted; from here on the campaign becomes a sprint, with the potential for more hairpin turns.
Before polls closed Tuesday, the Clinton campaign had reached out to supporters frazzled by her third-place Iowa finish and Obama's rise in New Hampshire polls.
One fundraiser said aides had sent word around the country that they planned to reexamine every facet of Clinton's operation, with a focus on her frequently shifting message. But as the returns rolled in Tuesday night, pessimism abruptly turned to euphoria. "We're gearing up, not shaking up," said Ann Lewis, a senior Clinton advisor.
Among those set to join the campaign is Doug Sosnik, a former political director and senior advisor in the Clinton White House.
New Hampshire has long hosted the nation's first primary -- giving the tiny state a huge say in picking presidents -- and on Tuesday residents embraced their opportunity with gusto. Turnout was expected to set a record of about 500,000 voters, meaning nearly four in 10 residents went to the polls.
From the beginning, New Hampshire's Democratic primary was a fight between Clinton and Obama. Edwards, who finished second in Iowa, was never a strong factor here.
Clinton shifted tactics upon arriving Friday, becoming more accessible to voters and reporters, and more pointed in her criticism of Obama. His elegant words, she said over and over, were no match for her Washington expertise.
Obama largely glided above the give-and-take, propounding his inspiring, if sometimes vague, message of hope and change. When he responded to Clinton, rarely by name, his tone as often as not was mocking and dismissive.
Obama won the argument, but not the primary.
More than half of Democratic voters in New Hampshire said the most important quality in a candidate was the ability to bring about change, and Obama captured that segment by two to one over Clinton. Fewer than one in five said experience was the most important quality; Clinton won their support overwhelmingly, according to a statewide survey of voters as they left their polling places.
But Clinton had party regulars to thank for her win, as well as strong support among women. Self-identified Democrats backed the former first lady, while Obama carried the independents.
There was also a clear gender gap; nearly six in 10 voters were women, and they tilted toward Clinton. She also won among working-class voters and union members.
Clinton may also have been helped by the tears that welled in her eyes Monday, her final day of campaigning, when a sympathetic questioner asked how she handled the rigors of the race.
At a raucous victory party Tuesday night, campaign chairman Terry McAuliffe told reporters he was convinced that Clinton benefited when she let down her emotional guard. "People saw how passionate she is about the issues," he said.
The political dynamic entering Tuesday was more complex on the Republican side.
McCain, the victor here in 2000, needed a repeat win to resuscitate a campaign many left for dead just a few weeks ago. Romney, the longtime New Hampshire pacesetter and a next-door neighbor, hoped to bounce back from a disappointing second-place finish in Iowa.
McCain stumped here the way he did before his victory eight years ago, turning his campaign into a rollicking-fun ride aboard his "Straight Talk Express" bus, regaling reporters for countless hours en route to more than 100 town hall meetings. He stressed his solidity on issues -- pointing to his support for the Iraq war when he was practically alone on that point -- and the seriousness of the times.
Romney, by contrast, shifted tactics as quickly as he landed on New Hampshire soil. He embraced the change message that voters had delivered in Iowa, and insisted that the 71-year-old, four-term senator from Arizona was too much a part of Washington -- and, he implied, too old -- to beat Obama, or to shake up the capital city if elected.
In a concession speech Tuesday night before several hundred supporters in Bedford, Romney tried to put the best face on his New Hampshire and Iowa defeats, noting that he had won the obscure Wyoming caucuses in between the two better-known contests.
"There have been three races so far," he told the crowd. "I've gotten two silvers and one gold." He vowed to "fight across this nation -- on to Michigan and South Carolina and Florida and Nevada, and states after that."
For other candidates, New Hampshire was a way station en route to more crucial contests further down the campaign trail: South Carolina for Huckabee and former Sen. Fred Thompson of Tennessee; Florida for Giuliani. Paul, fueled by his online constituency, has defied conventional strategies.
For Republicans, values and direct talk were the most important factors in Tuesday's results. More than a third of GOP voters said that sharing their personal values was the most important qualification for a candidate, and they supported Romney over Huckabee.
About three in 10 Republicans said directness was the most important quality in a candidate, and they supported McCain by more than three to one.
Independents were crucial to the outcome of the GOP contest. McCain prevailed thanks to their votes, running essentially even with Romney among self-identified Republicans. Evangelicals, who turned out heavily in Iowa and carried Huckabee to his victory, were less of a factor in New Hampshire. Just over two in 10 voters Tuesday identified themselves as evangelicals or born-again Christians, compared with about six in 10 in Iowa. Huckabee, McCain and Romney carried about a third each.
New Hampshire was swaddled Tuesday in unseasonably warm weather -- the temperature surpassed 60 degrees in the southern part of the state -- and that helped drive voters to the polls.
The crush of interest was clear at the Hudson Community Center, a voting place about 12 miles south of Manchester, where at midday half a dozen cars were backed up waiting for parking slots. More than 50 voters were lined up before dawn to cast ballots at Brookside Congregational Church in Manchester, one of the city's major polling places.
Across the state, hundreds of chanting partisans lined sidewalks, in small hamlets and New Hampshire's biggest cities, creating spontaneous sign-waving competitions among assorted camp followers. Passing motorists honked their support, each affirmation greeted by a roar from the street.
The electricity -- and urgency -- lent both a festive air and a powerful sense of moment to the day's civic exercise.
Jane Sander, 60, who manages a boutique in downtown Portsmouth, waited 15 minutes to vote first thing Tuesday at Rye Elementary School -- "usually you're in and out" -- and her expression nearly matched the glow of her fire-engine-red knit suit.
"I think everybody's excited about the election because of the possibility of change," said Sander, a longtime Republican who crossed over to vote for Obama because she believed "he can bring people together: Democrats, Republicans, independents."
Her shop door was thrown open to soak up the energy from the sidewalk demonstration outside. "If I could be on the street and not working, I'd be out there too," she said, grinning. "It's fabulous."
Times staff writers Michael Finnegan, Scott Martelle, Joe Mathews, Peter Nicholas and Maeve Reston and associate Times Poll director Jill Darling contributed to this report.