Elsewhere on the ballot, voters in Maine and Maryland became the first to approve same-sex marriage by popular vote while Washington state and Colorado legalized recreational use of marijuana.
The most expensive presidential campaign in history, at $2 billion plus, targeted people in the nine states that determined the outcome, and the two sides drenched voters there with more than a million ads, the overwhelming share of them negative.
Obama claimed at least seven of those states, most notably Ohio, seen as the big prize. He also prevailed in Iowa, New Hampshire, Colorado, Nevada, Virginia and Wisconsin. Romney got North Carolina.
Florida was too close to call Wednesday morning. The unofficial count had Obama with a 46,000-vote lead, but Florida historically has left as many as 5 percent of its votes uncounted until after Election Day.
Overall, Obama won 25 states and the District of Columbia. Romney won 24 states.
It was a more measured victory than four years ago, when Obama claimed 365 electoral votes to Arizona Sen. John McCain's 173, and won 53 percent of the popular vote.
Preliminary figures indicate fewer people participated this time. Associated Press figures showed that about 118 million people had voted in the White House race, but that number will rise as more votes are counted. In 2008, 131 million people voted, according to the Federal Election Commission.
Follow Nancy Benac on Twitter: http://www.twitter.com/nbenac
Copyright 2012 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.