WASHINGTON Democrat Barack Obama captured the White House on Tuesday after an extraordinary two-year campaign, defeating Republican John McCain to make history as the first black U.S. president.
Obama will be sworn in as the 44th U.S. president on January 20, 2009 and will face a crush of immediate challenges, from tackling an economic crisis to ending the war in Iraq and trying to overhaul the U.S. health care system.
McCain saw his hopes for victory evaporate with losses in a string of key battleground states led by Ohio, the state that narrowly clinched President George W. Bush's re-election in 2004, and Virginia, a state that had not backed a Democrat since 1964.
McCain told supporters in Phoenix he had called Obama to congratulate him on his victory and praised his foe's inspirational and precedent-shattering campaign.
"We have come to the end of a long journey," McCain told supporters. "I urge all Americans who supported me to join me in not just congratulating him but offering our next president our goodwill."
Obama led a Democratic electoral landslide that also expanded the party's majorities in both chambers of Congress and firmly repudiated eight years of Bush's leadership.
The win by Obama, son of a black father from Kenya and white mother from Kansas, marked a milestone in U.S. history. It came 45 years after the height of the civil rights movement led by Martin Luther King.
The announcement of Obama's win on U.S. television networks set off celebrations by supporters around the country, from Times Square in New York to Ebenezer Baptist Church in Atlanta, King's home church.
"This is a great night. This is an unbelievable night," said U.S. Rep. John Lewis of Georgia, who was brutally beaten by police in Selma, Alabama, during a voting rights march in the 1960s.
Tens of thousands of Obama supporters gathered in Chicago's Grant Park for an election night celebration, cheering results that showed his victories in key states. Obama was to address the crowd later in the evening.
The Rev. Jesse Jackson, a civil rights leader, joined the celebrations, tears streaming down his cheeks.
In a campaign dominated at the end by a flood of bad news on the economy, Obama's leadership and proposals on how to handle the crisis tipped the race in his favour. Exit polls showed six of every 10 voters listed the economy as the top issue.
Obama has promised to restore U.S. leadership in the world by working closely with foreign allies and dropping some of the policies that made Bush an unpopular leader at home and abroad.
McCain, a 72-year-old Arizona senator and former Vietnam War prisoner, had hoped to become the oldest president to begin a first term in the White House and see his running mate Sarah Palin become the first female U.S. vice president.
But he lost not only Ohio and Virginia but also Iowa and New Mexico, two more states won by Bush in 2004. His loss in Pennsylvania, a state won by Democrats in the last four elections, eliminated his best hope of capturing a Democratic-leaning state.
Long lines greeted voters on Election Day in many key states but no major breakdowns or irregularities were reported as at least 130 million Americans were expected to cast votes on a successor to the unpopular Bush.
The voting on Tuesday capped an extraordinary two-year campaign marked by the rapid rise from obscurity of Obama and his bitter Democratic primary battle with New York Sen. Hillary Clinton, and McCain's comeback from the political scrap heap to win the Republican nomination.
Obama hammered his favourite theme throughout the campaign, accusing McCain of representing a third term for Bush's policies and being out of touch on the economy.
McCain, whose campaign attacked Obama as a socialist and accused him of being a "pal" with terrorists, portrayed him as a tax-raising liberal.
But in a difficult political environment for Republicans, McCain struggled to separate himself from Bush. Exit polls showed three out of every four voters thought the United States was on the wrong track.
In the fight for Congress, Democrats were making big gains as well, but appeared unlikely to pick up the nine Senate seats to reach a 60-seat majority that would give them the muscle to defeat Republican procedural hurdles.
Democrats had picked up four seats early on Tuesday and knocked off two-high profile Republican incumbents -- North Carolina Sen. Elizabeth Dole, a former presidential candidate and wife of 1996 Republican presidential nominee Bob Dole, and New Hampshire Sen. John Sununu.
Democrats also gained about 25 more House of Representatives seats to give them a commanding majority in that chamber.
(Editing by Kieran Murray)