The culmination of the epic two-year campaign marks a historic moment in a nation that since its founding has struggled with racial divisions. It also ushers in a period of dominance for Democrats in Washington for the first time since the early years of President Bill Clinton's first term. With Tuesday's elections, Sen. Obama's party will control both houses of Congress as well as the White House, setting the scene for Democrats to push an ambitious agenda from health care to financial regulation to ending the war in Iraq.
In becoming the U.S.'s 44th president, Illinois Sen. Obama, 47 years old, defeated Arizona Sen. McCain, 72, a veteran lawmaker and Vietnam War hero. Despite a reputation for bucking his own party, Sen. McCain could not overcome a Democratic tide, which spurred voters to take a risk on a candidate with less than four years of national political experience. Sen. Obama is the first northern Democrat elected president since John F. Kennedy in 1960.
Also elected: Joe Biden of Delaware as vice president, the veteran senator who has promised to help Sen. Obama steer his agenda through Congress.
Sen. Obama's victory was built on record fund raising and a vast national campaign network. It remade the electoral map that had held fast for eight years. He overwhelmed reliable Democratic strongholds in the Northeast and West Coast. He won big in the industrial Midwest and contested fiercely in areas of traditional Republican strength. He won Virginia, the first time a Democratic candidate had taken the state since Lyndon Johnson in 1964. And he finally wrested Florida and Ohio from the GOP, two states that had bedeviled his party in the last two elections.
The president-elect will enter office with a long policy wish list that includes ending the war in Iraq, implementing a near-universal health-insurance plan and finding alternatives to Middle Eastern oil. All this will have to be carried out amid record budget deficits, a looming crisis in Social Security and Medicare spending as the baby-boom generation retires and fears that the nation is on the edge of a deep recession.
Democrats have touted the prospect of a big sweep not just as a partisan conquest but as an ideological turning point, one that could reverse the last great shift in 1980, when Ronald Reagan ushered in a period dominated by tax-cutting conservatism and muscular foreign policy.
It's a startling turnaround from just four years ago, when Republicans controlled Congress and the White House, and benefited from a conservative majority on the Supreme Court. The party's intellectual leaders spoke of a permanent Republican majority in Washington.
What remains unclear, however, is whether Tuesday's results represent a vote for liberalism or against the failures of the Bush administration, including the early war years in Iraq, the calamity of Hurricane Katrina and the current economic slump.
The transition to an Obama administration could begin almost immediately. A shadow Treasury team could be in place by the end of the week, aides say. In many ways, the transition has already started. John Podesta, a former White House chief of staff under President Clinton, has been leading quiet conversations about key positions, especially those relating to the economy.
Late in the evening, Sen. Obama hit 338 electoral-college votes -- far exceeding the threshold of 270 needed to win -- with victories in the battleground states of Florida, Ohio and Virginia. National exit poll results found Sen. Obama increasing his vote percentages across the board, with particular success coming from the youth and black votes, as many in his campaign had predicted. Although a preliminary figure, his 51% of the popular vote marks the first time since Mr. Johnson that a Democrat had clearly won more than half the nation's vote.
Sen. Obama took 96% of black voters, who increased their share of the electorate to 13% from 11%. Sen. John Kerry of Massachusetts won 88% of the black vote in 2004. Sen. Obama won two-thirds of Hispanics and more than two-thirds of voters aged 18 to 29.
One important swing was the Roman Catholic vote, which went 47% to Sen. Kerry in 2004, compared with 53% for Sen. Obama.
Sen. Obama won among independents but divided the suburban vote. And among voters in families earning over $200,000 a year, Sen. Obama improved over Sen. Kerry by 17 points.
Helping Sen. Obama: Democrats made up a larger share of the electorate this year than they did four years ago, when equal numbers of voters identified as Democrats and as Republicans. This time, 40% said they were Democrats and just 32% said they were Republicans.
Sen. Obama's campaign organization reached corners of the country largely untouched by previous Democratic candidates, from Boise, Idaho, to Biloxi, Miss. It didn't work out everywhere -- he lost North Dakota and Georgia. But he put long-standing Republican territory into play, a tactic that put Sen. McCain on the defensive.
Democrats also bolstered their majorities on Capitol Hill. The party secured a number of Senate victories, bringing it teasingly close to a filibuster-proof margin. Party leaders will likely be able to make up the one or two additional votes with moderate Republicans. The party picked up at least 10 House seats, a number expected to grow significantly.
In Arizona, Sen. McCain offered congratulations to his opponent and spoke of the historic moment and the importance of the day to African-Americans. A century ago, he recalled, there was outrage in many quarters when President Theodore Roosevelt invited Booker T. Washington to visit the White House.
"America today is a world away from the cruel and prideful bigotry of that time," Sen. McCain said during a gracious concession speech. "There is no better evidence of this than the election of an African-American to the presidency of the United States."
The Arizona senator also pledged to put the bitterness of the campaign aside and to work with the new president through the difficult times facing the nation.
Sen. McCain phoned Sen. Obama to concede the race and both men pledged to work together. President George W. Bush also phoned the victor and promised a smooth transition. "You are about to go on one of the great journeys of life. Congratulations and go enjoy yourself," the president told his successor.
Sen. Obama declared victory in Chicago's Grant Park in front of an audience of 125,000 people, saying, "If there is anyone out there who still doubts America is a place where all things are possible, who still wonders if the dream of our founders are alive in our time, who still questions the power of our democracy, tonight is your answer."
The 2008 election, the longest and most expensive presidential campaign in U.S. history, was a watershed in many ways. It featured the first woman -- New York Sen. Hillary Clinton -- to seriously contend for a party nomination. Gov. Sarah Palin of Alaska became the first woman to appear on the Republican ticket. And Sen. Obama broke ground as the first black party nominee for president.
"Obama is documentation of America's moral progress, the moral evolution we have gone through in the past 40 years," said Shelby Steele, a black writer and a fellow at Stanford's Hoover Institution, who voted for Sen. McCain. "Whites don't get credit for it. But having grown up myself in segregation -- America has changed enormously."
The candidates spent about $1.6 billion on the election, double the 2004 presidential race, according to the Center for Responsive Politics. When all is tallied, Sen. Obama is expected to have raised around $700 million, a sum made possible when he opted to forgo public financing, the first candidate to do so since the system was implemented in the wake of the Watergate scandal. That decision, and the resulting bonanza, is likely to change how future campaigns are funded.
Indications from early voting and lengthy lines at the polls point to the biggest voter turnout in the period since women got the vote in 1920. In total, voter registration numbers were up 7.3% compared with the last presidential election, for a total of 153 million eligible voters.
The race also featured the most extensive use yet of the Internet. Online social networks spread the campaign to corners of the country that had never before experienced such intense electioneering.
"I wanted to be part of this historic day in our country and watch people in this community exercise their God-given right," said Earl Simms, a 65-year-old former city safety manager standing at the head of the line at his Jacksonville, Fla., precinct.
By tradition, the first ballots were cast just after midnight in tiny Dixville Notch, N.H. Sen. Obama got 15 votes and Sen. McCain six.
Many African-Americans were celebrating how far a black man had come.
"It's a feeling we feel all the way inside -- Lord, we're finally overcoming," said Willie Smiley, 65, a retired government worker from Detroit.
Benjamin T. Jealous, president and CEO of the NAACP, the nation's oldest civil-rights group, said his 92-year-old grandmother, whose grandfather was a slave, is "giddy" at the prospect of seeing young black girls holding pajama parties at the White House.
"At this moment, it feels as if anything is possible, and that is the way it needs to be in this country," he said in an interview Tuesday.
-- Jonathan Weisman and Laura Meckler, The Wall Street Journal