In recent days, the New York senator had begun to retool her appeal to voters, lessening her emphasis on experience and raising questions about Obama's ability to bring about the change he promises.
Clinton won mainline Democrats, by 45 percent to 34 percent; Obama won independents by a wider 45 percent to 30 percent. Independents accounted for just over four in 10 New Hampshire voters, down from 48 percent in the last primary in 2004, and a high of 50 percent in 1992.
All of the Democratic candidates poured resources into the Granite State.
But in the end, it was Clinton who beat out her Democratic rivals, securing her position as a leading Democratic presidential candidate, and giving her campaign renewed energy in its battle with Obama for Democratic voters.
ABC News' John Donvan, Kate Snow, Sarah Amos, Raelyn Johnson, Sunlen Miller, Gary Langer and The Associated Press contributed to this report.