In a grinding, marathon election battle, Obama -- who made history four years ago when he was elected as the nation's first African-American president -- outdueled Romney -- a wealthy businessman-turned-politician -- across the electoral map in critical battleground states including Ohio and Pennsylvania. He appeared headed for a narrow popular vote victory as well.
"We are an American family and we rise and fall together," Obama told an exultant, flag-waving crowd of 10,000 at Chicago's McCormick Place.
The president, first lady Michelle Obama and their daughters, Malia and Sasha, took the stage at 1:36 a.m. New York time, more than two hours after the TV networks called him the winner, with Bruce Springsteen's "We Take Care of Our Own" and Stevie Wonder's "Signed, Sealed, Delivered" blaring over the loudspeakers.
"Tonight, in this election, you, the American people, reminded us that though 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 heart, for the United States of America, the best is yet to come."
He said he looked forward to sitting with Romney within the next few weeks to talk about "how to move the country forward."
Looking to a second term, Obama said, "Our economy is recovering. A decade of war is ending. A long campaign is now over. And whether I earned your vote or not, I have listened to you. I have learned from you. And you made me a better president."
He said he would work with both parties in the coming months to try to fix the tax code and immigration system and to free the country from dependence on foreign oil.
"I have never been more hopeful about our future. I have never been more hopeful about America's future, and I ask you to sustain that hope," he said.
Calling for an end to the polarization laid bare by the campaign, Obama said, "We are not as divided as our politics suggest.
"We remain more than a collection of red states and blue states. We are -- and forever will be -- the United States of America."
Romney conceded in a postmidnight phone call to Obama. About 12:55 a.m., the defeated challenger took the stage at his Boston headquarters for a five-minute speech.
"I have just called President Obama to congratulate him on his victory," Romney said. "This is a time of great challenges to America, and I pray the president will be successful in guiding our nation."
He thanked his wife, Ann -- "She would have been a wonderful first lady" -- his five sons who did "tireless work" for his campaign, and said, "At a time like this we can't risk partisan bickering and posturing."
On Tuesday, the Republican nominee had written a 1,118-word victory speech that he thought would conclude his yearslong quest for the presidency. His concession speech took five minutes.
Romney's running mate, Rep. Paul Ryan (R-Wis.), received a consolation prize -- re-election to his House seat.
Defying some predictions, it appeared Obama would win the popular vote as well as the electoral vote, but not by much.
With only Florida still too close to call, Obama led Romney 303-206 in electoral votes -- more than the 270 needed for victory, according to a CNN tally. With 99 percent of Florida precincts reporting just after 3:30 a.m., Obama had 4,122,789 votes (50 percent) to Romney's 4,079,589 (49 percent).
At 3:45 a.m. Wednesday, of the more than 114 million votes cast nationwide, Obama had about 1,780,420 popular votes more than Romney -- an edge of 2 percentage points -- with 92 percent of the precincts reporting. Still untallied votes in Democratic-tilting West Coast states including California could increase his margin.
Romney's election hopes fell like dominoes as one swing state after another was called for Obama -- Pennsylvania, New Hampshire, Iowa, Michigan, Wisconsin and, most devastatingly for the Republican, Ohio. Colorado, Nevada and Virginia also broke Obama's way.
In a campaign that cost more than $2 billion -- a record -- both candidates poured a disproportionate share of their resources into those states.
Of the states Obama won in 2008, only Indiana and North Carolina went to the Republican.
"Obama's win is a vindication of four years of real progress in this country that was discounted by the Romney campaign," said Jay Jacobs, chairman of the Nassau Democratic Party.
"Republicans stood in his way," said Ron Law of the Bronx, part of a cheering crowd at a state Democratic committee party at a midtown Manhattan hotel. "Now we can start working together rather than dividing the country."
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 Bush bore responsibility for current circumstances than Obama did after nearly four years in office.
Voters surveyed in exit polls said they were slightly more positive about the country's direction than when they chose Obama four years ago as the country's economy was melting down with a banking crisis and the catastrophic end of a real estate bubble. But their interest in a more activist federal government has been dampened.
The polls also suggest a slightly more Republican electorate than in 2008.
The campaign's final hours were intense. Vice President Joe Biden flew unannounced to counter Romney in Ohio. Obama stayed in hometown Chicago, reaching out to swing-state voters on the phones and via satellite while the other three candidates had a high noon showdown along the shore of Lake Erie.
Romney and running mate Ryan had scheduled the stop together on Monday, and Biden flew in to play defense as Romney waited on his plane for Ryan's arrival.
The rush for Ohio and its 18 electoral votes highlighted the importance of the state. Polls going into Election Day showed Obama with a narrow lead there, and Romney said the eleventh-hour campaigning was meant to leave him with no regrets.
"I can't imagine an election being won or lost by, let's say, a few hundred votes and you spent your day sitting around," Romney told Richmond radio station WRVA earlier in the day. "I mean, you'd say to yourself, 'Holy cow, why didn't I keep working?' And so I'm going to make sure I never have to look back with anything other than the greatest degree of satisfaction on this whole campaign."
Obama visited a campaign office close to his home in Chicago and was met by applause and tears from volunteers before he picked up a phone to call voters in neighboring Wisconsin. He told reporters that the election comes down to which side can get the most supporters to turn out.
Both sides cast the Election Day choice as one with far-reaching repercussions for a nation still recovering from the biggest economic downturn since the Great Depression and at odds over how big a role government should play in solving the country's problems.
"We can make sure that we make even greater progress going forward in putting folks back to work and making sure that they've got decent take-home pay, making sure that they have the health insurance that they need, making sure we're protecting Medicare and Social Security," Obama said in an interview broadcast Tuesday on "The Steve Harvey Morning Show." "All those issues are on the ballot, and so I'm hoping that everybody takes this seriously."
Romney argued that Obama had his chance to help Americans financially and blew it.
"If it comes down to economics and jobs, this is an election I should win," Romney told Cleveland station WTAM.
With both sides keeping up the onslaught of political ads in battleground states right into Election Day, on one thing, at least, there was broad agreement: "I am ready for it to be over," said nurse Jennifer Walker in Columbus, Ohio.
With Sid Cassese, Ellen Yan, The Associated Press and The Washington Post