WASHINGTON -- Barack Obama was swept to the White House on Tuesday by enraptured Americans who embraced his message of hope and turned their backs on centuries of racial division by electing their first black president.

The Illinois senator, born to a white mother and an African father 47 years ago, was elected in a momentous day that many black Americans believed they would never see. It came some 232 years after the country was founded on the ideal that all men were created equal.

News of his win prompted jubilant celebrations across the United States, as millions of weeping and exhilarated Americans took to the streets.

It seemed less an election and more a coronation of a man who inspired Americans from every walk of life with his consistent message of hope and pledge to end the divisive politics of President George W. Bush.

"What we are witnessing in America is a non-violent revolution," Congressman John Lewis, an iconic figure of the civil rights movement, said Tuesday night as the results came in.

"It is a revolution of values. It is a revolution of ideas."

In Obama's hometown of Chicago, hundreds of thousands of people gathered in a city park to celebrate their native son's entry into the history books on an unseasonably warm night.

Thousands of cheering people also assembled in New York's Times Square in a scene more reminiscent of New Year's Eve than election night.

It's considered a watershed moment in American history.

The U.S. economy is in a shambles. America's prestige abroad has been battered. Victory in two wars in far-flung Iraq and Afghanistan remains elusive.

Obama's popularity among voters reflected the fervent desire of millions of Americans to chart a new course for a country that many believe has lost its way in the past eight years.

But it wasn't just Obama who promised change. McCain, a moderate Republican distrusted by his party's social conservatives, won the nomination on the pledge of a new direction for America.

The Vietnam war hero represented a repudiation of those very socially conservative ideals that had been the bedrock of his party for decades. He effectively ran his campaign against the Republicans.

Nonetheless, polls had suggested for weeks that Obama was about to become the first African-American to be elected president.

Election day was the culmination of almost two years of politicking by McCain and Obama, who both fought tough battles during the primary season to win their respective party's nominations.

Their showdown against one another was bare-knuckled, but the economic crisis benefited Obama, who dealt with it with assured calm, compared to McCain's erratic responses to the financial meltdown.

McCain also faced relentless criticism for his choice of the much-maligned Sarah Palin as his running mate. After causing a brief bump in the polls for the Arizona senator soon after he chose her, the self-styled hockey mom and social conservative was a consistent drag on the Republican ticket.

Many Americans, including lifelong and prominent Republicans, said they could not vote for McCain because of Palin and would cast their ballots for Obama instead.

Indeed, Obama's popularity continued to climb throughout the campaign. Some suggest the widespread acceptance of him as a viable presidential candidate represents the passing of a torch to a new generation, one that's racially diverse, accepting of minorities, socially progressive and weary of old-style politics.

He was particularly adored by two major groups of voters -- young Americans between the ages of 18 and 30 who favoured him almost 3-1 over McCain, and African-Americans, millions of whom registered to vote for the first time in order to cast their ballots for him.

At a Washington, D.C., subway station earlier Tuesday, one black man stood in tears on the platform as he spoke of how he'd voted earlier that morning.

"I never thought I'd see this day," Sam Richardson, 65, said as he wiped tears from his face. "I just would never have believed it could happen in my lifetime."

Obama cast his ballot in Chicago early Tuesday with his young daughters by his side, while McCain voted in Phoenix accompanied by his wife, Cindy.

For a few moments on this day, with much of their campaigning behind them, Obama and McCain were simply voters, just two Americans among millions who trekked to the polls to cast their ballots. Both men then went on, however, to make some last-ditch public appeals to voters.

"Some of the pundits may have written us off but I want to tell you, they may not know it, but the Mac is back," McCain told supporters in Colorado, a key battleground state that polls suggested was going to Obama this election.

By midday Tuesday, stories of long lineups at polling stations across the country suggested that predictions of record-breaking voter turnout were turning out to be accurate. Many cities like Los Angeles and Dallas reported sky-high voter turnout, something that was expected to benefit the Democrats.

"I got here at 4:30 this morning and already 20 people were in line, and by 6 a.m., when the poll opened, there were about 200 people," said a Democratic party lawyer who volunteered to monitor a polling station in Spotsylvania, Va.

By 2 p.m., she said, 1,500 people had voted and hundreds more were expected between the busiest hours of 4 p.m. to 7 p.m. In the 2004 election, a total of 1,900 people cast ballots at the same polling station.

"It's huge," said the lawyer, who didn't want to be identified. "This kind of turnout is very unusual."