NEW YORK/WASHINGTON - Glowing with triumph, President Barack Obama rekindled his theme of hope Wednesday, telling Americans “the best is yet to come” after defying dark economic omens with a decisive re-election win.

The nationwide popular vote remained extremely close with Obama taking about 50 percent to 49 percent for Romney after drawing more than 56 million votes following a campaign in which the candidates and their party allies spent a combined $2 billion. But in the state-by-state system of electoral votes that decides the White House, Obama notched up a comfortable victory.

By early on Wednesday, Obama had 303 electoral votes, well over the 270 needed to win, to Romney’s 206. Florida’s close race was not yet declared, leaving its 29 electoral votes still to be claimed.

In his victory speech, Obama pledged to move the United States “beyond this time of war, to shape a peace that is built on the promise of freedom and dignity for every human being”.

However, daunting challenges lie ahead for the re-elected president on issues ranging from ruined economy at home to tattered image abroad – mainly due to the recoiling backlog of security-related issues Obama inherited from his predecessor – George W. Bush. At home, Obama would continue dealing with unflinching Republicans in the House of Representatives where they’ve maintained their majority. Overseas, America’s war interest is stretched into terrains as far as militancy-hit Afghanistan and the bordering Pakistan, a country which is key ally in the “war on terror” but where anti-American sentiment runs deep, with Obama admin intensifying drone strikes despite sagacious calls from the local political leadership that such strikes only spur hatred and militancy on the ground. Several international rights groups too have questioned the legality of such drone strikes which have killed more civilians than militants. Other international challenges facing Obama include the West’s nuclear standoff with Iran, the civil war in Syria and dealing with an increasingly assertive China.

Though Obama won a far narrower victory over Romney than his historic election as the country’s first black president in 2008, it did not stop him from basking in the glow of re-election together with thousands of elated supporters in his hometown of Chicago.

“You voted for action, not politics as usual,” Obama said, calling for compromise and pledging to work with leaders of both parties to reduce the deficit, to reform the tax code and immigration laws, and to cut dependence on foreign oil.

Obama told the crowd he hoped to sit down with Romney in the coming weeks and examine ways to meet the challenges ahead - though the president appears more in need of mending fences with Republican congressional leaders who wield clout in Washington.

“We want to pass on a country that’s safe and respected and admired around the world, a nation that is defended by the strongest military on earth and the best troops this - this world has ever known,” he said.

Romney, a multimillionaire former private equity executive, came back from a series of campaign stumbles to fight a close battle after besting Obama in the first of three presidential debates.

But the former Massachusetts governor failed to convince voters of his argument that his business experience made him the best candidate to repair a weak US economy.

Romney, 65, conceded defeat in a speech delivered to disappointed supporters at the Boston convention center. “This is a time of great challenge for our nation,” he told the crowd. “I pray that the president will be successful in guiding our nation.

He warned against partisan bickering and urged politicians on both sides to “put the people before the politics.”

The Republican Party, after losing two presidential contests, is now likely to go through a period of painful soul-searching, especially over how it has alienated Hispanic voters, an important constituency in Obama’s victory.

A cheer of jubilation sounded at the Obama campaign headquarters in Chicago when the television networks began projecting him as the winner at 11:20 pm (9am PST), even as the ballots were still being counted in many states where voters had waited in line well into the night.

“Tonight in this election, you, the American people, reminded us that while our road has been hard, while our journey has been long, we have picked ourselves up, we have fought our way back,” Obama told his supporters. “We know in our hearts that for the United States of America, the best is yet to come.”

Obama’s re-election extended his place in history, carrying the tenure of the nation’s first black president into a second term. His path followed a pattern that has been an arc to his political career: faltering when he seemed to be at his strongest — the period before his first debate with Romney — before he redoubled his efforts to lift himself and his supporters to victory.

The evening was not without the drama that has come to mark so many recent elections: For more than 90 minutes after the networks projected Obama as the winner, Romney held off calling him to concede. And as the president waited to declare victory in Chicago, Romney’s aides were prepared to head to the airport, suitcases packed, potentially to contest several close results.

But as it became increasingly clear that no amount of contesting would bring him victory, he called Obama to concede shortly before 1 am (PST). “I wish all of them well, but particularly the president, the first lady and their daughters,” Romney told his supporters in Boston.

As Obama’s victory was confirmed with wins in rustbelt Ohio and his spiritual political home in Iowa, large crowds suddenly materialised outside the White House, chanting “four more years” and “O-bama, O-bama.”

Obama prevailed despite lingering dissatisfaction with the economy. The Democrats also retained majority in the Senate, which they have held since 2007, but fell short of the 60-vote super majority needed to sidestep minority blocking tactics.

The Republicans kept control of the House of Representatives, which analysts say will likely result in more of the gridlock that characterised Obama’s first term, with the House and the president at loggerheads on most legislation.

Obama congratulated Romney and Republican vice-presidential candidate Paul Ryan on their “hard-fought campaign”.

“I have never been more hopeful about America. And I ask you to sustain that hope,” Obama said, striving for inspiration rarely shown in a campaign where the prophet of hope of 2008 became a conventional, brawling politician.

“I have always believed that hope is that stubborn thing inside us that insists, despite all the evidence to the contrary, that something better awaits us so long as we have the courage to keep reaching, to keep working, to keep fighting,” Obama said.

Obama’s victory means that he will get the chance to embed his healthcare and Wall Street reforms deep into the fabric of American life – Romney had pledged one of his first acts would be the repeal of Obamacare.

The president may also get the chance to reshape the Supreme Court in his liberal image for a generation, a move that would shape policy on issues like abortion and gay rights.

Obama’s win bucked history, as it came with the unemployment rate pegged at 7.9 percent, the highest level for a re-elected president in more than 70 years. Remarkably, his coalition of Hispanic, black, and young voters turned out in similar numbers to those of his heady change-fuelled campaign in 2008, shocking Romney’s team and presenting a new American face to the world.

Obama will soon face a showdown with Republicans on Capitol Hill over the so-called “fiscal cliff” – a combination of dramatic spending cuts and tax increases set to take effect if US lawmakers cannot cut a deal on the deficit. It remains to be seen whether Republicans – who have opposed the president tooth and nail for the last four years – will be more conciliatory after Romney’s drubbing or double down to block any potential legacy projects.

The president paved the way to victory with a staunch defence of Democratic bastions in Pennsylvania, Wisconsin and Michigan, at which Romney had made a last-minute run when he saw more conventional paths to the White House blocked. Obama also locked in swing states, including Virginia – where he became the first Democrat to win since 1964 four years ago – Nevada, Ohio, New Hampshire, Colorado and Iowa, crushing Romney’s slim hopes of a viable path to victory. Romney could only wrestle Indiana and North Carolina from Obama’s 2008 map.

The win in Iowa will be especially sweet for Obama, as the heartland state nurtured his unlikely White House dreams way back in 2007. A tear rolled down his cheek as he held his last-ever campaign rally there late Monday. His victory in Ohio represents a delayed repayment for his gutsy call in 2009 to mandate a federal bailout of the auto industry, on which one in eight jobs in the state depend. Romney had opposed the move.

Obama won with a fiercely negative campaign branding Romney – a multi-millionaire former corporate turnaround wizard – as indifferent to the woes of the middle class. Exit polls showed that though only 39 percent of people believed that the economy was improving, around half of Americans blamed former Republican president George W. Bush for the tenuous situation, and not Obama.

Obama’s victory was a complete vindication for a campaign team that had predicted a close but winnable election, despite the painful after-effects of the deepest economic crisis since the 1930s Great Depression. He was also helped by Latino voters, whose strong support was crucial in the western desert state of Nevada and the Rocky Mountain state of Colorado.

Republicans had insisted right up to the election day that Obama’s army, disaffected by busted expectations for his first term, would stay home, and had predicted instead a late Republican wave that would elevate Romney. The president ran for re-election on a platform of offering a “fair shot” to the middle class, of fulfilling his pledge to end the war in Iraq, killing Osama bin Laden, and starting to build a clean energy economy.

The president may have been helped at the 11th hour when superstorm Sandy roared ashore, killing more than 100 Americans but giving Obama the chance to project leadership at the head of a multi-state disaster response.