Obama became only the second Democrat to win a second four-year White House term since World War II, when television networks projected he would win the bellwether state of Ohio where he had staged a pitched battle with Romney.
"This happened because of you. Thank you," Obama tweeted to his 22 million followers on Twitter as a flurry of states, including Iowa, which nurtured his unlikely White House dreams suddenly tipped into his column.
With a clutch of swing states, including Florida and Virginia still to be declared, Obama already had 275 electoral votes, more than the 270 needed for the White House and looked set for a comfortable victory.
There was a sudden explosion of jubilation at Obama's Chicago victory party as the first African American president, who was elected on a wave of hope and euphoria four years ago, booked another four years in the White House.
Romney's aides had predicted that a late Romney wave would sweep Obama from office after a single term haunted by a sluggish recovery from the worst economic crisis since the 1930s Great Depression and high unemployment.
But a huge cheer rang out at Obama headquarters when television networks projected Obama would retain Pennsylvania and its 20 electoral votes, and the party grew wilder as they called Wisconsin and Michigan.
The mood at Romney headquarters in Boston however had grown subdued throughout the evening as partisans stared at their smart phones.
Disappointed Republicans were seen leaving what had been billed as a celebration of Romney's expected triumph in central Washington.
Defeats in New Hampshire, where Romney has a summer home and Wisconsin, the home of Republican vice presidential nominee Paul Ryan were especially sickening for Republicans.
Early signs were that the election, while a building triumph for Obama would do little to ease the deep polarization afflicting US politics, as Republicans racked up huge margins in safe states, though struggled in battlegrounds.
Exit polls appeared to vindicate the vision of the race offered by Obama's campaign, when top aides predicted that Obama's armies of African American, Latinos and young voters would come out in droves.
Polls also showed that though only 39 percent of people believed that the economy was improving, around half of Americans blamed President George W. Bush for the tenuous situation, and not Obama.
The president, who made history by becoming America's first black president after a euphoric victory, carved a new precedent on Tuesday by defying the portents of a hurting economy to win a second term.
He awaited his fate in his hometown of Chicago, while Romney, a multi-millionaire former investment manager and Massachusetts governor was laying low in a hotel in Boston awaiting results.
As expected, television networks projected that Republicans would win the House of Representatives.
Democrats clung onto the Senate, and retained a seat in Missouri, where Senator Claire McCaskill fended off a challenge by Representative Todd Akin, whose remarks about rape and abortion sparked national outrage.
Both presidential candidates had earlier marked time while voters dictated their fates.
Romney appeared caught up in the emotion of seeing his name on the ballot for President of the United States and also saw an omen in a huge crowd that showed up at a multi-story parking lot to see his plane land at Pittsburgh airport.
"Intellectually I felt that we're going to win this and I've felt that for some time," Romney told reporters on his plane.
"But emotionally, just getting off the plane and seeing those people standing there... I not only think we're going to win intellectually but I feel it as well."
While Romney penned his victory speech, Obama took part in his election day tradition of playing a game of pick-up basketball with friends, including Chicago Bulls legend Scottie Pippen, after visiting a campaign office near his Chicago home.
The president, who like a third of Americans voted before election day, congratulated Romney on "a spirited campaign" despite their frequently hot tempered exchanges.
"I know that his supporters are just as engaged and just as enthusiastic and working just as hard today. We feel confident we've got the votes to win, that it's going to depend ultimately on whether those votes turn out," he said.
"I think anybody who's running for office would be lying if they say that there's not some butterflies before the polls come in because anything can happen," the president added later in a radio interview.
CBS News, quoting early exit polls, said 39 percent of people approached after they had voted said the economy, the key issue, was improving, while 31 percent said it was worse and 28 saw it as staying the same.
Voters were also choosing a third of the Democratic-led Senate and the entire Republican-run House of Representatives. But, with neither chamber expected to change hands, the current political gridlock will likely continue.
The US presidential election is not directly decided by the popular vote, but requires candidates to pile up a majority -- 270 -- of 538 electoral votes awarded state-by-state on the basis of population.
A candidate can therefore win the nationwide popular vote and still be deprived of the presidency by falling short in the Electoral College.
The election went ahead in New Jersey with thousands of people without power, and large areas devastated by superstorm Sandy which roared ashore last week killing more than 100 people.
Adora Agim, an immigrant from Nigeria, said the chaos shouldn't stop voting. "I have lived in a Third World country where your vote does not matter. It's nice to be somewhere where it matters," she said, in Hoboken, New Jersey.
The central message of Obama's campaign has been that he saved America from a second Great Depression after the economy was on the brink of collapse when he took over from Republican president George W. Bush in 2009.
He claims credit for ending the war in Iraq, saving the US auto industry, killing Osama bin Laden, offering almost every American health insurance, and passing the most sweeping Wall Street reform in decades.
Romney sought to mine frustration with the slow pace of the economic recovery and argued that the president was out of ideas and has no clue how to create jobs, with unemployment at 7.9 percent and millions out of work.