Democrat Barack Obama pledged after winning a second term as president that the "best is yet to come" for the United States.

Accompanied on stage at the massive McCormick Place convention center in Chicago by his wife and their two daughters, Obama said after defeating Republican challenger Mitt Romney that the "task of perfecting our union moves forward."

"Whether I earned your vote or not, I have listened to you. I have learned from you and you have made me a better president," Obama said in the wee hours of Wednesday, pledging to return to the White House "more determined and more inspired than ever."

Obama, who fulfilled a campaign promise to end the combat mission in Iraq during his first term, said the challenges that still await him include reducing the deficit, overhauling the tax code and finding a comprehensive solution to the nation's troubled immigration system.

He also congratulated Romney on his campaign and said he hoped to sit down with the former Massachusetts governor to discuss how the two parties can work together to "move this country forward."

"I've never been more hopeful about our future. I've never been more hopeful about America. And I ask you to sustain that hope," Obama said.

Obama won nearly all the key battleground states in Tuesday's balloting, including Pennsylvania, Wisconsin, Virginia and all-important Ohio.

Pending final results in Florida, Obama was expected to finish with 332 electoral votes, compared with 206 for Romney.

A candidate needs 270 electoral votes to win.

The nation's first black president will again face a divided Congress when he begins his second term in January, as media projections showed the GOP retaining control of the House of Representatives and Democrats maintaining a majority in the Senate.

Obama won re-election despite an unemployment rate of nearly 8 percent, the highest for a sitting president since Franklin Roosevelt. EFE