Barack Obama has become the first black US president after a landslide election victory. The 47-year-old Democrat led his Republican rival John McCain by 297 votes to 139 as he passed the magic number of 270 needed to win the presidency at 4am GMT. Later projections showed he won by 338 votes to 156. News of the victory sparked delirious scenes at rallies across the country including a party for Obama supporters in Chicago. Mr Obama told the crowd: "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." He added: "At this defining moment, change has come to America." Conceding defeat in his home state of Arizona, Mr McCain said: "The American people have spoken and they have spoken clearly. This is an historic election." Mr McCain joined outgoing president George W Bush in calling Mr Obama to congratulate him personally. The first-term senator from Illinois will be sworn in as the 44th US president on January 20, 2009. The win by Mr Obama, the son of a black father from Kenya and white mother from Kansas, comes 45 years after the high point of the equality movement led by Martin Luther King Jr. The assassinated civil rights leader's daughter Bernice King said: "I was very excited tonight and moved to tears." The new president elect faces a crush of immediate challenges, including the economic crisis, conflict in Iraq and Afghanistan and an ailing health care system.