World leaders on Wednesday quickly hailed the triumph of Barack Obama in the US presidential election as the start of a new era but there were also calls for a new deal with the global superpower.
Celebrations erupted in capitals around the world. A national holiday was declared in Kenya -- where Obama's father was born -- to welcome the first black US president.
"Your brilliant victory rewards a tireless commitment to serve the American people. It also crowns an exceptional campaign whose inspiration and exaltation have proved to the entire world the vitality of American democracy," French President Nicolas Sarkozy said in a letter to Obama.
"By choosing you, the American people have chosen change, openness and optimism," Sarkozy added.
British Prime Minister Gordon Brown praised Obama's "energising politics ... his progressive values and his vision for the future" as congratulations poured in before the final result was even announced in the race between Obama and Republican John McCain.
China's President Hu Jintao said in a written message: "In a new historical era, I look forward to... taking our bilateral relationship of constructive cooperation to a new level."
Japanese Prime Minister Taro Aso pledged to work with the new US leader to strengthen relations. Mexican President Felipe Calderon congratulated Obama on his "triumph" and invited him to visit the United States' southern neighbour.
Australian Prime Minister Kevin Rudd said Obama's victory was a landmark for equality.
"Twenty-five years ago Martin Luther King had a dream of an America where men and women would be judged not on the colour of their skin but on the content of their character," Rudd told reporters. "Today what America has done is turn that dream into a reality."
But European Commission president Jose Manuel Barroso called for the election to usher in a "new deal" between the United States and the rest of the world to tackle the global financial crisis and other troubles.
"This is a time for a renewed commitment between Europe and the United States of America," Barroso said in a statement. "We need to change the current crisis into a new opportunity. We need a new deal for a new world."
Wars in Iraq and Afghanistan will quickly top the list of White House priorities but Obama's election would not lead to a quick US disengagement from Iraq, Iraqi Foreign Minister Hoshyar Zebari said.
"We don't think there will be change in policy overnight. There won't be quick disengagement here. A great deal is at stake here," Zebari told AFP, adding that Baghdad was looking for a "successful partnership" with Obama.
Israeli-US relations have "a bright future," Israeli foreign ministry spokesman Ygal Palmor said. But Palestinian president Mahmud Abbas urged Obama to speed up efforts to reach an Israeli-Palestinian peace agreement.
"President Abbas congratulates US president-elect Barack Obama in his name and in the name of the Palestinian people and hopes he will speed up efforts to achieve peace, particularly since a resolution of the Palestinian problem and the Israeli-Arab conflict is key to world peace," said Abbas spokesman Nabil Abu Rudeina.
Election parties were held in major capitals around the world bringing together expatriate Americans and people anxious over events in the United States.
Hundreds of villagers in Kogelo, Obama's Kenyan family home, erupted into song and dance. President Mwai Kibaki declared a national holiday on Thursday to mark Obama's victory.
Swinging branches and chairs in the air, men cheered and clapped while women shouted "Obama! Obama!" in the village where his grandmother lives and where his late Kenyan father was born.
Wild celebrations woke the sleepy village, people hugged each other as others ran aimlessly in the muddy streets after spending a chilly night glued to a giant screen watching results on US networks.
"Senator Obama is our new president. God has answered our prayer," said pastor Washington Obonyo.
"Because Obama has won, we will have a change in the whole world. And for that I will slaughter a cockrel to celebrate with my family," said Joseph Otieno, a jubilant Kogelo resident.
In the small Japanese town of Obama, hula dancers, ecstatic chanting and rock'n'roll greeted the election triumph.
Obama means "small shore" in Japanese and many in the small fishing town of 32,000 people chanted Obama's name and his slogan, "Yes, we can!".