President Barack Obama has been re-elected president of the United States after a hard-fought election.
"This happened because of you. Thank you," the president said on his Twitter account.
Romney led narrowly in the popular vote, by about 30,00 votes out of more than 98 million cast, with ballots counted in 74 percent of the nation's precincts.
But Obama's laserlike focus on the battleground states allowed him to run up a sizeable margin in the competition for electoral votes, where it mattered.
He won Ohio, Wisconsin, Virginia, Iowa, New Hampshire, Colorado and Nevada, seven of the nine battlegrounds where the rivals and their allies poured nearly $1 billion into dueling television commercials
The Chicago convention center where Obama supporters gathered to watch the results exploded in joy and enthusiasm. Not so at the Romney camp in Boston, which was muted as results increasingly showed the tally of electoral votes rising in Obama's column.
In Obama's victory speech, delivered around 1:30 a.m., he stressed the need for unity.
“While our road has been hard, our journey has been long, we have picked ourselves up, we have fought our way back and we know in our hearts that for the USA, the best is yet to come,” Obama said.
“I want to thank every American who participated in this election, whether you voted for the very first time, or waited in line for a very long time, by the way, we have to fix that.”
Republican presidential candidate Mitt Romney delivered his concession speech just before 1 a.m. Wednesday. He wished Obama and his family well, and stressed the need for Americans to refrain from bipartisan bickering.
"I believe in America. I believe in the people of America. And I ran for office because I'm concerned about America," Romney said.
The Republican nominee had already written a 1,118-word victory speech that he thought would conclude his yearslong quest for the presidency. Earlier Tuesday, Romney said he had no regrets no matter the outcome.
Democrats retained control of the Senate with surprising ease. Republicans were on course for the same in the House, making it likely that Speaker John Boehner of Ohio, Obama's partner in unsuccessful deficit talks, would reclaim his seat at the bargaining table.
The election emerged as a choice between two very different visions of government — whether it occupies a major, front-row place in American lives or is in the background as a less-obtrusive facilitator for private enterprise and entrepreneurship.
The economy was rated the top issue by about 60 percent of voters surveyed as they left their polling places. But more said former President George W. Bush bore responsibility for current circumstances than Obama did after nearly four years in office.
That bode well for the president, who had worked to turn the election into a choice between his proposals and Romney's, rather than the simple referendum on the economy during his time in the White House.
Unemployment stood at 7.9 percent on election day, higher than when he took office. And despite signs of progress, the economy is still struggling after the worst recession in history.
There was no doubt about what drove voters to one candidate or the other.
About 4 in 10 said the economy is on the mend, but more than that said it was stagnant or getting worse more than four years after the near-collapse of 2008. The survey was conducted for The Associated Press and a group of television networks.
In the battle for the Senate, Democrats won seats currently held by Republicans in Indiana and Massachusetts.
In Maine, independent former Gov. Angus King was elected to succeed retiring GOP Sen. Olympia Snowe. He has not yet said which party he will side with, but Republicans attacked him in television advertising during the race, and Democrats rushed to his cause.
Polls were still open in much of the country as the two rivals began claiming the spoils of a brawl of an election in a year in which the struggling economy put a crimp in the middle class dreams of millions.
Arguably the most controversial ballot issue in Georgia was the charter school amendment. Approval of the amendment creates a commission selected by the governor and other education leaders that will decide where and when to place charter schools across the state.
With 96 percent of precincts reporting, 58 percent of Georgians approved the amendment, while 42 percent were against it. Those in favor believe it gives families more educational opportunities, but opponents don’t want the governor overriding local communities.