WASHINGTON — Barack Obama captured a second White House term, blunting a mighty challenge by Republican Mitt Romney as Americans voted for a leader they knew over a wealthy businessman they did not.
Obama, America's first black president, easily captured far more than the 270 electoral votes needed for victory and further cemented his place in American history Tuesday with a victory, despite having led the country through its most difficult economic times since the Great Depression in the 1930s, a time of stubbornly high unemployment and anxiety about the future.
Obama told a rally of cheering supporters that the election "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.
For the United States, "the best is yet to come," he said.
Romney said he had called Obama to concede, and in an appearance before supporters in Boston he congratulated the president saying, "I pray that he will be successful in guiding our nation."
Both Romney and Obama spoke of the need for unity and healing the nation's partisan divide. But the election did nothing to end America's divided government. The Democrats retained their narrow majority in the Senate, while the Republicans kept control of the House of Representatives.
That means Obama's agenda will be largely in the hands of House Speaker John Boehner, the president's partner in unsuccessful deficit talks.
Obama's narrow lead in the popular vote will make it difficult for him to claim a sweeping mandate. With returns from 79 percent of the nation's precincts, Obama had 52.2 million, 49.5 percent. Romney had 51.7 million, 49 percent.
But Obama did have a sizeable victory where it mattered, in the competition for electoral votes. He had at least 303 votes to Romney's 206.
The president is chosen in a state-by-state tally of electors, not according to the nationwide popular vote, making such "battleground" states — which vote neither Republican nor Democrat on a consistent basis — particularly important in such a tight race.
Obama won Ohio, Wisconsin, Virginia, Iowa, New Hampshire, Colorado and Nevada, seven of the nine battleground states where the rivals and their allies poured nearly $1 billion into dueling television commercials.
Of the nine battleground states, Romney captured only North Carolina. The final swing state — Florida — remained too close to call.
The election emerged as a choice between two very different visions of government — whether it occupies a major, front-row place in American lives or is in the background as a less-obtrusive facilitator for private enterprise and entrepreneurship.
The economy was rated the top issue by about 60 percent of voters surveyed as they left polling places. But more said former President George W. Bush bore responsibility for current circumstances than Obama did after nearly four years in office.
About 4 in 10 said the economy is on the mend, but more than that said it was stagnant or getting worse more than four years after the near-collapse of 2008. The survey was conducted for The Associated Press and a group of television networks.
Polls were still open in much of the country as the two rivals began claiming the spoils of a brawl of an election in a year in which the struggling economy put a crimp in the middle class dreams of millions.
While Obama spent the final day of his final campaign in Chicago, Romney raced to Ohio and Pennsylvania for Election Day campaigning and projected confidence as he flew home to Massachusetts. "We fought to the very end, and I think that's why we'll be successful," he said, adding that he had finished writing a speech anticipating victory but nothing if the election went to his rival.
But the mood soured among the Republican high command as the votes came in and Obama ground out a lead in critical states.
Like Obama, Vice President Joe Biden was in Chicago as he waited to find out if he was in line for a second term. Republican running mate Paul Ryan was with Romney in Boston, although he kept one eye on his re-election campaign for a House seat in Wisconsin, just in case.
The long campaign's cost soared into the billions, much of it spent on negative ads, some harshly so.
Obama and Romney spent months highlighting their sharp divisions over the role of government in Americans' lives, especially in bringing down the stubbornly high unemployment rate, reducing the $1 trillion-plus federal budget deficit and reducing a national debt that has crept above $16 trillion.
Obama insists there is no way reduce the staggering debt and safeguard crucial social programs without asking the wealthy to pay their "fair share" in taxes. Romney, who bragged of his successful business background said that gave him the expertise to manage the economy. He favored lowering taxes and easing regulations on businesses, saying it would spur job growth.
No U.S. president since Franklin D. Roosevelt in the 1930s had run for re-election with a national jobless rate as high as it is now — 7.9 percent in October.