The tight race has also secured Obama as a formidable opponent for Clinton, setting up what may become a bloody political battle between the two Democratic rivals going into the big-state primaries Feb. 5.
"I come tonight with a full heart," Clinton told a crowd of supporters in Manchester. "Together let's give America the kind of comeback that New Hampshire has just given me." Supporters chanted "Comeback kid!"
"We're going to take what we learned here in New Hampshire and make our case," she said. "We are in it for the long run!"
Over 24 hours, the Clinton campaign went from despair and bitterness to euphoria, buoyed by the victory in New Hampshire.
"We're back," Clinton pollster Mark Penn told ABC News.
Looking tired and disappointed, Obama conceded victory to Clinton, speaking to a crowd of supporters who were yelling "We want change!"
"You can be the new majority who can lead this nation out of a long political darkness -- Democrats, independents and Republicans who are tired of the division and distraction that has clouded Washington," Obama said.
"If we mobilize our voices to challenge the money and influence that's stood in our way and challenge ourselves to reach for something better, there's no problem we can't solve, no destiny we cannot fulfill," he said.
Both Obama and Edwards called Clinton Tuesday night to congratulate her.
Introducing her husband at a rally in Manchester, Elizabeth Edwards said, "The goal is still in sight."
Conceding defeat in the Granite State, Edwards congratulated both Obama and Clinton but vowed to continue his campaign.
"Two races down, 48 states left to go," Edwards said before a crowd of supporters.
Long before the final count came in for the Democratic primary in New Hampshire, New Mexico Gov. Bill Richardson took to the stage at his rally in Manchester admitting defeat for a second time but refusing to bring his campaign to an end.
"We head out west and the fight goes on," Richardson told the cheering crowd of about 150 supporters.
Hours before her victory in New Hampshire, Clinton made a major shakeup in the top echelons of her campaign.
Maggie Williams, Clinton's former chief of staff from her days as first lady, was tapped to take the reins of the campaign and will be in charge of day-to-day operations.
"Maggie brings a comfort level," a Clinton campaign source told ABC News' Kate Snow. "She is a woman. She's a minority. She can talk the talk, and she understands the field operations."
Exit poll results suggested Clinton's candidacy resonated with women, especially older women.
Clinton's campaign inspired a gender gap in New Hampshire, with Clinton winning by 9 points among women voters, while Obama won men by a wide 42 percent to 30 percent margin.
Among women ages 65 and over, Clinton won 57 percent to Obama's 27 percent. In comparison, Clinton and Obama tied at 39 percent among men 65 and over.
The economy was the single biggest issue to voters, and that worked for Clinton as well. Among those who called it their top concern, she beat Obama by 9 points, 44 percent to 35 percent.
Obama won the message game. Exit poll results indicate 55 percent of Democratic primary voters said they're most interested in a candidate who can bring about needed change.
Only about two in 10 say they care most about experience -- the message most touted during the campaign by Clinton.