Front-running Republican presidential candidate Mitt Romney heads to New Hampshire and friendlier territory for the second state nominating contest next week, after the tightest of victories in Iowa.
Just eight votes separated Mr Romney, the former Massachusetts governor, from former Pennsylvania senator Rick Santorum.
Mr Santorum staged a near-miraculous rise from single-digit support in the Mid-Western state to become Mr Romney's strongest competitor in a race that will play out over the next six months in primary elections and caucuses nationwide.
Mr Romney had 30,015 votes, compared to 30,007 for Mr Santorum, whose fortunes were boosted by his appeal to evangelical Christians and social conservatives in a state that is largely farmland and 91% white.
The chaos that has marked the early months of the Republican race has diverted attention from Mr Obama, who is vulnerable in his bid for a second term because of the stagnant US economy and high unemployment.
Before his victory was announced, Mr Romney added to his already-formidable national network by announcing the endorsement of John McCain, who twice won the New Hampshire primary and was the Republican nominee in 2008.
While the nominal winner in Iowa, Mr Romney's campaign has failed to catch the imagination of a Republican base there or nationwide. Those voters have grown ever more conservative in recent years and view him with grave distrust for having taken moderate positions in the past. But Romney is the favourite of the party establishment, which sees him as the candidate best equipped to defeat Obama.
Texan Ron Paul, who drew a younger crowd with his libertarian views, came third, and former House Speaker Newt Gingrich was fourth after a recent and dramatic rise and fall in the polls. Both men vowed to carry on.
Texas governor Rick Perry, who came fifth, said he would return home to reassess his candidacy. Michele Bachmann was a distant sixth, and her campaign appeared in disarray.
Mr Romney is heavily favoured in New Hampshire, with contests in South Carolina and Florida packed into the final weeks of the month.