U.S. President Barack Obama's inauguration on Tuesday inspired celebration and cries of hope across the world.

Anti-apartheid hero Nelson Mandela hailed Obama as a "new voice of hope" for the world on Tuesday and compared his inauguration as U.S. president to South Africa's historic transition to democracy.

In a letter handed to Obama before Tuesday's ceremony, the former South African leader congratulated the new president on what he called a "truly historic" moment for the United States and the world.

"We are in some ways reminded today of the excitement and enthusiasm in our own country at the time of our transition to democracy," Mandela wrote in the letter, issued on Tuesday.

"People, not only in our country but around the world, were inspired to believe that through common human effort injustice can be overcome and that together a better life for all can be achieved."

Mandela, who led South Africans in the fight against white rule and has become a global icon for freedom, said Obama's election to office had "inspired people as few other events in recent times have done".

"You, Mister President, have brought a new voice of hope that these problems can be addressed and that we can in fact change the world and make of it a better place."

Mandela said he shared in a special "excitement and pride" felt by Africans because of the ties linking Obama - whose father was a black Kenyan - to the continent.

"You will always be in our affection as a young man who dared to dream and to pursue that dream," Mandela wrote. "We wish you well."

British PM: Obama has determination to solve world's problems

British Prime Minister Gordon Brown Tuesday hailed Obama as a leader with the determination "to solve the world's problems."

In a statement marking Obama's inauguration Brown said it heralded a "new chapter in both American history and the world's history."

Brown praised the new U.S. president as a "man of great vision and moral purpose" who would tackle the global financial crisis and other problems such as the environment.

"He's not only the first black American president but he sets out with the determination to solve the world's problems," Brown said.

Obama knew that these were "extraordinary times with unprecedented challenges" and had already shown "great courage and boldness" by setting out plans to combat the financial crisis.

Earlier, Buckingham Palace said Queen Elizabeth II has sent a message of support to Obama on the eve of his inauguration.

Brown, in a letter to Obama, said he was "ready to work very closely with his administration on many of the international challenges we face."

Brown's spokesman played down suggestions that he was in a race with other European leaders, such as French President Nicolas Sarkozy, to be the first to secure an invitation to visit Obama at the White House.

Germany's president, Horst Koehler, congratulated Obama by telegram Tuesday on his inauguration and invited him to visit Germany soon.

Obama has in effect two counterparts in Germany: Koehler as head of state and Chancellor Angela Merkel as head of government. Merkel had earlier Tuesday welcomed Obama in remarks on German television.

Referring to this year's anniversary of the end of communism in Germany in 1989, Koehler wrote in the message: "It's largely thanks to our American friends that we Germans are celebrating this year our freedom and unification."

Muslim world celebrate Obama inauguration, but with mixed feelings

Many across the Middle East heralded Obama's inauguration but expressed reservations about how much he will actually change U.S. policy in a region where anti-American sentiment spiked during the Bush administration.

Obama used a few words in his inauguration speech to reach out to the Muslim world, saying the U.S. was seeking a new way forward, based on mutual interest and mutual respect.

"To those who cling to power through corruption and deceit and the silencing of dissent, know that you are on the wrong side of history; but that we will extend a hand if you are willing to unclench your fist," Obama said.

A news presenter on the pan-Arab satellite channel Al-Jazeera cut into a live broadcast of the speech just after those words to say that they were in sharp contrast with President George W. Bush's speech four years earlier.

One political researcher said the Muslim street will be happy with the speech though some Muslim rulers may not be.

"This is because [Obama] pointed the finger at leaders who rule by corruption and persecution - and some of these are in the Muslim world - and said America will stand against them," said Diaa Rashwan, political researcher for Al-Ahram Center for Political and Strategic Studies in Cairo, Egypt.

Iraqis expressed mixed feelings about the new president, with some saying Obama represents a significant new page in U.S. history and others questioning how much American policy will change in Iraq.

"Today is a big day for America when a black president takes office," said Ali Salam, a 45-year-old stationary store owner in Baghdad. This is real democracy and the results of the people's struggle.

Muna Abdul-Razzaq, a 37-year-old primary school teacher in the northern Iraqi city of Mosul, said "Iraqis have bad memories of Bush who destroyed Iraq."

"We hope that Obama will be more responsible," she said.

But Muhsin Karim, a 50 year-old official in Iraq's Oil Ministry, said, "I don't expect a big change in Iraq because America is a state of institutions, where Obama will find few options to change anything.

Historically black Harlem hails Obama

New York's historic black neighborhood of Harlem brimmed with joy on Tuesday as Barack Obama took office as America's first black president.

Elated crowds filled theaters and churches and jammed sidewalks to watch the inaugural festivities televised from Washington, bursting into cheers each time the new president appeared on the screen.

In the streets, car horns blared in celebration.

"I wouldn't miss this for nothing in the world," said Erika Greene, a security guard who watched the ceremony on a large outdoor television screen set up on 125th Street, one of the neighborhood's main thoroughfares.

Harlem, in uptown Manhattan, has long been the heart of the city's black culture and home to generations of black artists, writers, politicians and activists.

"We've bled, we've fought, we've done it," Greene said. "This is our time."

Tens of thousands of Kenyans cheer Obama presidency

Meanwhile, tens of thousands of Kenyans celebrated Barack Obama's inauguration at parties across the east African nation as images of their favourite son were beamed onto big screens.

Thousands gathered at a public viewing at Nairobi's Kenyatta International Conference Center, clapping and cheering as President Obama spoke.

In Kogelo, the Western Kenyan village where his late father grew up and where his grandmother still lives, residents slaughtered goats and bulls and feasted in Obama's honor.

Earlier in the day, around 3,000 people gathered at a school in Kogelo to watch traditional dancers in brightly coloured costumes.

In nearby Kisumu, thousands danced into the evening as music blasted out from loudspeakers.

Parties were expected to continue late into the night as Kenyans, who often do not need much of an excuse to enjoy a few beers, take the chance to fete the new president.

Kenyans are fiercely proud of Obama, and the celebrations allowed people to forget their woes, which include a food crisis threatening 10 million people with starvation and memories of the ethnic clashes that killed over 1,500 people one year ago following disputed elections.

Many Kenyans, and indeed Africans, hope that President Obama's Kenyan roots will help bring a new focus on the continent's myriad problems.

At the very least, many say they feel a new sense of self-respect since a black American with humble roots in Kenya can reach the White House.

Kogelo has already seen concrete benefits, with electricity, water and road upgrades following Obama's election.

The tiny Kisumu airport is also expected to be upgraded quickly to accommodate Air Force One should President Obama wish to fly in to visit his grandmother.