WASHINGTON/CHICAGO/JOHANNESBURG - President Barack Obama has won another term in the White House, with Obama himself tweeting "four more years" and a picture of himself celebrating with his wife Michelle.

Major television networks like CNN, CBS and MSNBC all predicted a win for the Democrat.

It has been a close call between him and his Republican challenger Mitt Romney, but Obama gained momentum in the last few hours of votes.

CNN correspondent Jessica Yellin was at Times Square in New York, where Obama supporters are celebrating.

Yellin said there was a wide range of supporters there who have held on to Obama's promises.

“This is the kind of coalition the president made clear he was interested in appealing to and is a lesson that the republican party will learn from. The president did make some explicit promises about what he will do in his second term, cutting the deficit and not extending the tax cuts for the wealthiest Americans, among others.”

Meanwhile, Obama's Kenyan grandmother Sarah told CNN, “I appreciate that it is a tough race, but I’m praying to god that he will win and I feel confident that he will win because he has worked hard.”

Obama defeated Romney in a series of key swing states despite a weak economic recovery and persistent high unemployment as US voters decided between two starkly different visions for the country.

Obama's victory in the hotly contested swing state of Ohio as projected by TV networks put him over the top in the fight for the 270 electoral votes needed to clinch the White House and ended Romney's hopes of pulling off a string of swing-state upsets.

Obama scored narrow wins in Ohio, Wisconsin, Iowa, Pennsylvania and New Hampshire, all states that Romney had contested, while the only swing state captured by Romney was North Carolina, according to network projections.

At least 120 million American voters had been expected to cast votes in the race between the Democratic incumbent and Romney after a campaign focused on how to repair the ailing US economy.

Obama's projected victory would set the country's course for the next four years on spending, taxes, healthcare, the role of government and foreign policy challenges such as the rise of China and Iran's nuclear ambitions.

Each man offered different policies to cure what ails America's weak economy, with Obama pledging to raise taxes on the wealthy and Romney offering across-the-board tax cuts as a way to ignite strong economic growth.

Inside Obama's Chicago campaign headquarters, staffers erupted into cheers and high fives as state after state was called for the president.

Obama watched the returns on television at his Chicago home.

Senior campaign strategist David Axelrod said via email that he was feeling "great."

Romney made last-minute visits to Ohio and Pennsylvania on Tuesday to try to drive up turnout in those states, while Vice President Joe Biden was dispatched to Ohio.

Obama enters his second four-year term faced with a difficult task of tackling $1 trillion annual deficits, reducing a $16 trillion national debt, overhauling expensive social programs and dealing with a gridlocked US Congress that looked likely to maintain the same partisan makeup.