CONCORD, N.H. — Sen. Hillary Rodham Clinton powered to victory in New Hampshire's Democratic primary Tuesday night in a startling upset, defeating Sen. Barack Obama and resurrecting her bid for the White House. Sen. John McCain defeated his Republican rivals to move back into contention for the GOP nomination.
"I felt like we all spoke from our hearts and I am so gratified that you responded," Clinton said in victory remarks before cheering supporters. "Now together, let's give America the kind of comeback that New Hampshire has just given me."
Her victory, after Obama won last week's Iowa caucuses, raised the possibility of a prolonged battle for the party nomination between the most viable black candidate in history and the former first lady, seeking to become the first woman to occupy the Oval Office.
"I am still fired up and ready to go," a defeated Obama told his own backers, repeating the line that forms a part of virtually every campaign appearance he makes.
McCain's triumph scrambled the Republican race as well.
"We showed this country what a real comeback looks like," the Arizona senator told The Associated Press in an interview as he savored his triumph. "We're going to move on to Michigan and South Carolina and win the nomination."
Later, he told cheering supporters that together, "we have taken a step, but only a first step toward repairing the broken politics of the past and restoring the trust of the American people in their government."
McCain rode a wave of support from independent voters to defeat former Gov. Mitt Romney of Massachusetts, a showing that reprised the senator's victory in the traditional first-in-the-nation primary in 2000.
It was a bitter blow for Romney, who spent millions of dollars of his own money in hopes of winning the kickoff Iowa caucuses and the first primary _ and finished second in both. Even so, the businessman-turned politician said he would meet McCain next week in Michigan primary, and he cast himself as just what the country needed to fix Washington. "I don't care who gets the credit, Republican or Democrat. I've got no scores to settle," he told supporters.
After Iowa, Clinton and her aides seemed resigned to a second straight setback. But polling place interviews showed that female voters _ who deserted her last week _ returned to her column in New Hampshire column.
She also was winning handily among registered Democrats. Obama led her by an even larger margin among independents, but he suffered from a falloff in turnout among young voters compared with Iowa.
Word of Clinton's triumph set off a raucous celebration among her supporters at a hotel in Manchester _ gathered there to celebrate a New Hampshire primary every bit as surprising as the one 16 years ago that allowed a young Bill Clinton to proclaim himself "the comeback kid."
She was winning 39 percent to 36 percent for Obama. Former Sen. John Edwards of North Carolina trailed with 17 percent. New Mexico Gov. Bill Richardson was fourth, polling less than 5 percent.
Despite running a distant third to his better-funded rivals, Edwards had no plans to step aside. He pointed toward the South Carolina primary on Jan. 26, hoping to prevail in the state where he was born _ and where he claimed his only victory in the presidential primaries four years ago.
It was hard to tell who needed a Republican victory more _ McCain or Romney. McCain was the long-ago front-runner who survived a near-death political experience when his fundraising dried up and his support collapsed. He shed much of his staff and regrouped. An unflinching supporter of the Iraq war, he benefited when U.S. casualties declined in the wake of a controversial building in U.S. troops. By the final days of the New Hampshire race, he held a celebration of sorts to mark his 100th town hall meeting in the state he won eight years ago.
Former Arkansas Gov. Mike Huckabee, who won the leadoff Iowa GOP caucuses last week, was running third in New Hampshire.
McCain was winning 37 percent of the Republican vote, Romney had 32 and Huckabee 11. Former New York Mayor Rudy Giuliani had 9 percent, Texas Rep. Ron Paul 8.
Clinton's triumph was unexpected _ and unpredicted.
Obama drew huge crowds as he swept into the state after winning Iowa. Confident of victory, he stuck to his pledge to deliver "change we can believe in," while the former first lady was forced to retool her appeal to voters on the run. She lessened her emphasis on experience, and sought instead to raise questions about Obama's ability to bring about the change he promised.
The grind took a toll on both of them.
Obama suffered from a sore throat, while Clinton's voice quavered at one point when asked how she coped with the rigors of the campaign. That unexpected moment of emotion became the talk of the final 24 hours of the campaign.
Clinton's performance came as a surprise even to her own inner circle.
Officials said her aides were considering whether to effectively concede the next two contests _ caucuses in Nevada on Jan. 19 and the South Carolina primary a week later _ and instead try to regroup in time for a 22-state round of Democratic contests on Feb. 5.
These officials also said a campaign shake-up was in the works, with longtime Clinton confidante Maggie Williams poised to come aboard to help sharpen the former first lady's message. Other personnel additions are expected, according to these officials, who spoke on condition of anonymity while discussing strategy.
The close Democratic race resulted in Clinton and Obama each winning nine national convention delegates, with Edwards getting four, according to an AP analysis.
In the overall race for the nomination, Clinton leads with 187 delegates, including separately chosen party and elected officials known as superdelegates. She is followed by Obama with 89 delegates and Edwards with 50.
McCain won seven Republican delegates to four for Romney and one for Huckabee. New Hampshire originally had 24 Republican delegates, but the national party stripped half as punishment because the state broke party rules by scheduling its primary so early.
In the overall race for the GOP nomination, Huckabee leads with 31 delegates, followed by Romney with 19 and McCain with seven.
Obama's defeat came as he had appeared to be within reach of gaining an endorsement from the powerful Culinary Workers union in Nevada in the days ahead. He is still strong in South Carolina, where the Democratic electorate is heavily black and likely to go for the most viable black presidential candidate in history.
The Republican race turns next to Michigan, where McCain and Romney already are advertising on television, and where both men planned appearances on Wednesday. Huckabee also was expected to campaign in the state.
According to preliminary results of a survey of voters as they left their polling places, more independents cast ballots in the Democratic race than in the Republican contest. They accounted for four of every 10 Democratic votes and about a third of Republican ballots. The survey was conducted for The Associated Press and the television networks.
Republicans were split roughly evenly in naming the nation's top issues: the economy, Iraq, illegal immigration and terrorism. Romney had a big lead among those naming immigration, while McCain led on the other issues.
Half of Republicans said illegal immigrants should be deported, and this group leaned toward Romney. Those saying illegal immigrants should be allowed to apply for citizenship leaned toward McCain, while the two candidates split those saying those here illegally should be allowed to stay as temporary workers.
Among Democrats, about one-third each named the economy and Iraq as the top issues facing the country, followed by health care. Voters naming the economy were split about evenly between Obama and Clinton, while Obama had an advantage among those naming the other two issues. Clinton has made health care a signature issue for years.
About one-third said if Bill Clinton were running, they would have voted for him on Tuesday.
David Espo reported from Washington. AP writers Liz Sidoti, Nedra Pickler, Scott Lindlaw, Glen Johnson, Beverley Wang, Charles Babington, Holly Ramer and Clarke Canfield contributed to this report.