The election of Mr. Obama amounted to a national catharsis — a repudiation of a historically unpopular Republican president and his economic and foreign policies, and an embrace of Mr. Obama’s call for a change in the direction and the tone of the country.
But it was just as much a strikingly symbolic moment in the evolution of the nation’s fraught racial history, a breakthrough that would have seemed unthinkable just two years ago.
Mr. Obama, 47, a first-term senator from Illinois, defeated Senator John McCain of Arizona, 72, a former prisoner of war who was making his second bid for the presidency.
To the very end, Mr. McCain’s campaign was eclipsed by an opponent who was nothing short of a phenomenon, drawing huge crowds epitomized by the tens of thousands of people who turned out to hear Mr. Obama’s victory speech in Grant Park in Chicago.
Mr. McCain also fought the headwinds of a relentlessly hostile political environment, weighted down with the baggage left to him by President Bush and an economic collapse that took place in the middle of the general election campaign.
“If there is anyone out there who still doubts that America is a place where all things are possible, who still wonders if the dream of our founders is alive in our time, who still questions the power of our democracy, tonight is your answer,” said Mr. Obama, standing before a huge wooden lectern with a row of American flags at his back, casting his eyes to a crowd that stretched far into the Chicago night.
“It’s been a long time coming,” the president-elect added, “but tonight, because of what we did on this date in this election at this defining moment, change has come to America.”
Mr. McCain delivered his concession speech under clear skies on the lush lawn of the Arizona Biltmore, in Phoenix, where he and his wife had held their wedding reception. The crowd reacted with scattered boos as he offered his congratulations to Mr. Obama and saluted the historical significance of the moment.
“This is a historic election, and I recognize the significance it has for African-Americans and for the special pride that must be theirs tonight,” Mr. McCain said, adding, “We both realize that we have come a long way from the injustices that once stained our nation’s reputation.”
Not only did Mr. Obama capture the presidency, but he led his party to sharp gains in Congress. This puts Democrats in control of the House, the Senate and the White House for the first time since 1995, when Bill Clinton was in office.
The day shimmered with history as voters began lining up before dawn, hours before polls opened, to take part in the culmination of a campaign that over the course of two years commanded an extraordinary amount of attention from the American public.
As the returns became known, and Mr. Obama passed milestone after milestone —Ohio, Florida, Virginia, Pennsylvania, New Hampshire, Iowa and New Mexico — people rolled spontaneously into the streets to celebrate what many described, with perhaps overstated if understandable exhilaration, a new era in a country where just 143 years ago, Mr. Obama, as a black man, could have been owned as a slave.
For Republicans, especially the conservatives who have dominated the party for nearly three decades, the night represented a bitter setback and left them contemplating where they now stand in American politics.
Mr. Obama and his expanded Democratic majority on Capitol Hill now face the task of governing the country through a difficult period: the likelihood of a deep and prolonged recession, and two wars. He took note of those circumstances in a speech that was notable for its sobriety and its absence of the triumphalism that he might understandably have displayed on a night when he won an Electoral College landslide.
“The road ahead will be long, our climb will be steep,” said Mr. Obama, his audience hushed and attentive, with some, including the Rev. Jesse Jackson, wiping tears from their eyes. “We may not get there in one year or even one term, but America, I have never been more hopeful than I am tonight that we will get there. I promise you, we as a people will get there.” The roster of defeated Republicans included some notable party moderates, like Senator John E. Sununu of New Hampshire and Representative Christopher Shays of Connecticut, and signaled that the Republican conference convening early next year in Washington will be not only smaller but more conservative.
Mr. Obama will come into office after an election in which he laid out a number of clear promises: to cut taxes for most Americans, to get the United States out of Iraq in a fast and orderly fashion, and to expand health care.
In a recognition of the difficult transition he faces, given the economic crisis, Mr. Obama is expected to begin filling White House jobs as early as this week.
Mr. Obama defeated Mr. McCain in Ohio, a central battleground in American politics, despite a huge effort that brought Mr. McCain and his running mate, Gov. Sarah Palin of Alaska, back there repeatedly. Mr. Obama had lost the state decisively to Senator Hillary Rodham Clinton of New York in the Democratic primary.
Mr. McCain failed to take from Mr. Obama the two Democratic states that were at the top of his target list: New Hampshire and Pennsylvania. Mr. Obama also held on to Minnesota, the state that played host to the convention that nominated Mr. McCain; Wisconsin; and Michigan, a state Mr. McCain once had in his sights.
The apparent breadth of Mr. Obama’s sweep left Republicans sobered, and his showing in states like Ohio and Pennsylvania stood out because officials in both parties had said that his struggles there in the primary campaign reflected the resistance of blue-collar voters to supporting a black candidate.
“I always thought there was a potential prejudice factor in the state,” Senator Bob Casey, a Democrat of Pennsylvania who was an early Obama supporter, told reporters in Chicago. “I hope this means we washed that away.”
Mr. McCain called Mr. Obama at 10 p.m., Central time, to offer his congratulations. In the call, Mr. Obama said he was eager to sit down and talk; in his concession speech, Mr. McCain said he was ready to help Mr. Obama work through difficult times.
“I need your help,” Mr. Obama told his rival, according to an Obama adviser, Robert Gibbs. “You’re a leader on so many important issues.”
Mr. Bush called Mr. Obama shortly after 10 p.m. to congratulate him on his victory.
“I promise to make this a smooth transition,” the president said to Mr. Obama, according to a transcript provided by the White House .“You are about to go on one of the great journeys of life. Congratulations, and go enjoy yourself.”
For most Americans, the news of Mr. Obama’s election came at 11 p.m., Eastern time, when the networks, waiting for the close of polls in California, declared him the victor. A roar sounded from the 125,000 people gathered in Hutchison Field in Grant Park at the moment that they learned Mr. Obama had been projected the winner.
The scene in Phoenix was decidedly more sour. At several points, Mr. McCain, unsmiling, had to motion his crowd to quiet down — he held out both hands, palms down — when they responded to his words of tribute to Mr. Obama with boos.
Mr. Obama, who watched Mr. McCain’s speech from his hotel room in Chicago, offered a hand to voters who had not supported him in this election, when he took the stage 15 minutes later. “To those Americans whose support I have yet to earn,” he said, “I may not have won your vote, but I hear your voices, I need your help, and I will be your president, too.”
Initial signs were that Mr. Obama benefited from a huge turnout of voters, but particularly among blacks. That group made up 13 percent of the electorate, according to surveys of people leaving the polls, compared with 11 percent in 2006.
In North Carolina, Republicans said that the huge surge of African-Americans was one of the big factors that led to Senator Elizabeth Dole, a Republican, losing her re-election bid.
Mr. Obama also did strikingly well among Hispanic voters; Mr. McCain did worse among those voters than Mr. Bush did in 2004. That suggests the damage the Republican Partyhas suffered among those voters over four years in which Republicans have been at the forefront on the effort to crack down on illegal immigrants.
The election ended what by any definition was one of the most remarkable contests in American political history, drawing what was by every appearance unparalleled public interest.
Throughout the day, people lined up at the polls for hours — some showing up before dawn — to cast their votes. Aides to both campaigns said that anecdotal evidence suggested record-high voter turnout.
Reflecting the intensity of the two candidates, Mr. McCain and Mr. Obama took a page from what Mr. Bush did in 2004 and continued to campaign after the polls opened.
Mr. McCain left his home in Arizona after voting early Tuesday to fly to Colorado and New Mexico, two states where Mr. Bush won four years ago but where Mr. Obama waged a spirited battle.
These were symbolically appropriate final campaign stops for Mr. McCain, reflecting the imperative he felt of trying to defend Republican states against a challenge from Mr. Obama.
“Get out there and vote,” Mr. McCain said in Grand Junction, Colo. “I need your help. Volunteer, knock on doors, get your neighbors to the polls, drag them there if you need to.”
By contrast, Mr. Obama flew from his home in Chicago to Indiana, a state that in many ways came to epitomize the audacity of his effort this year. Indiana has not voted for a Democrat since President Lyndon B. Johnson’s landslide victory in 1964, and Mr. Obama made an intense bid for support there. He later returned home to Chicago to play basketball, his election-day ritual.