President Barack Obama claimed a second term from an incredibly divided electorate and immediately braced for daunting challenges and progress that comes only in fits and starts.
"We have fought our way back and we know in our hearts that for the United States of America, the best is yet to come," Obama said.
With 98 percent of the vote, Obama had 49.9 percent of the state's vote to Republican Mitt Romney's 49.2 percent.
"This happened because of you. Thank you" Obama tweeted to supporters as he secured four more years in the White House.
The same voters who gave Obama another four years also elected a divided Congress. Democrats retained control of the Senate; Republicans renewed their majority in the House.
It was a sweet victory for Obama, but nothing like the jubilant celebration of four years earlier, when his hope-and-change election as the nation's first black president captivated the world. This time, Obama ground out his win with a stay-the-course pitch that essentially boiled down to a plea for more time to make things right and a hope that Congress will be more accommodating than in the past.
Romney made a graceful concession speech before a disappointed crowd in Boston. He summoned all Americans to pray for Obama and urged the night's political winners to put partisan bickering aside and "reach across the aisle" to tackle the nation's problems.
Romney said he called Obama to congratulate him on his victory, adding that he prays "the president will be successful in guiding our nation."
Romney, tried to set a more conciliatory tone on the way off the stage.
"At a time like this, we can't risk partisan bickering," Romney said after a campaign filled with it. "Our leaders have to reach across the aisle to do the people's work."
Obama claimed a commanding electoral mandate - at least 303 electoral votes to 206 for Romney - and had a near-sweep of the nine most hotly contested battleground states.
But the close breakdown in the popular vote showed Americans' differences over how best to meet the nation's challenges. With more than 90 percent of precincts reporting, the popular vote went 50 percent for Obama to 48.4 percent for Romney, the businessman-turned-politician who had argued that Obama had failed to turn around the economy and said it was time for a new approach keyed to lower taxes and a less intrusive government.
Obama's re-election assured certainty on some fronts: His signature health-care overhaul will endure, as will the Wall Street reforms enacted after the economic meltdown. The drawdown of troops in Afghanistan will continue apace. And with an aging Supreme Court, the president is likely to have at least one more nomination to the high court.
The challenges immediately ahead for the 44th president are all too familiar: an economy still baby-stepping its way toward full health, 23 million Americans still out of work or in search of better jobs, civil war in Syria, an ominous standoff over Iran's nuclear program, and more.
Sharp differences with Republicans in Congress on taxes, spending, deficit reduction, immigration and more await.
And even before Obama gets to his second inaugural on Jan. 20, he must grapple with the threatened "fiscal cliff" - a combination of automatic tax increases and steep across-the-board spending cuts that are set to take effect in January if Washington doesn't quickly come up with a workaround budget deal. Economists have warned the economy could tip back into recession absent a deal.
Meanwhile, Elections officials in nine Florida counties are still tallying absentee ballots, after the presidential race was decided nationally.
Obama held a slim lead in Florida early Wednesday, but he didn't need the largest swing state to win re-election. Instead, he captured several other battleground states.
Long lines at the polls and last-minute absentee ballots delayed counting in some places.
State elections officials said absentee ballots were still being tallied in nine countries across the state.
They included Miami-Dade County, where elections officials counted through the night and had about 20,000 absentee ballots left to tally early Wednesday.
Pinellas County officials reconvened on Wednesday at 9 a.m. to tally more than 9,000 absentee ballots received on Election Day.
To the end, the presidential race was a nail-biter. About 1 in 10 voters said they'd only settled on their presidential choice within the last few days or even on Election Day, and they were closely divided between Obama and Romney. Nearly 1 percent of voters went for Libertarian Party candidate Gary Johnson, who was on the ballot in 48 states.
Obama re-elected despite tough economic times; Fla. tallying absentee…
In Trump's White House drama, Priebus is favorite target
Senate, White House pass on House push to revive health bill
White House calls for domestic cuts to finance border wall
Iowa Republicans back 'fetal heartbeat' abortion legislation