President Barack Obama met the family of South Africa's ailing anti-apartheid hero Nelson Mandela on Saturday and he praised the critically ill, retired statesman as one of history's greatest figures.
The faltering health of Mandela, 94, a figure admired globally as a symbol of struggle against injustice and racism, is dominating Obama's two-day visit to South Africa.
But Obama also faced protests by South Africans against U.S. foreign policy, especially American drone strikes.
Police fired stun grenades on Saturday to disperse several hundred protesters who had gathered outside the Soweto campus of the University of Johannesburg, where Obama was due to address a town hall meeting with students.
Obama, in South Africa on the second leg of a three-nation Africa tour, met Mandela relatives to deliver a message of support instead of directly visiting the former president at the hospital where he has spent the last three weeks.
The meeting took place at the Nelson Mandela Centre of Memory in Johannesburg.
Obama told reporters afterwards he also spoke by telephone with Mandela's wife Graca Machel, who remained by her husband's side in the hospital in Pretoria.
"I expressed my hope that Madiba draws peace and comfort from the time that he is spending with loved ones, and also expressed my heartfelt support for the entire family as they work through this difficult time," he said, using the clan name Madiba by which Mandela is affectionately known.
Obama earlier had talks with South African President Jacob Zuma and the two held a joint news conference in which Zuma said Mandela remained in a "critical but stable condition".
Obama's visit to South Africa had stirred intense speculation that the first African-American president of the United States would look in on the first black president of South Africa in his hospital room.
But Mandela's deterioration in the last week to a critical condition forced the White House to rule out the possibility of Obama and his wife seeing the frail ex-statesman.
Speaking to reporters at Pretoria's Union Buildings, where Mandela was inaugurated as president in 1994, Obama said the prayers of millions around the world were with the Nobel Peace laureate, who lay just one km (mile) away in hospital.
Adding to his previous praise of Mandela, Obama likened him to first U.S. president George Washington because of the decision of both to step down at the peak of their power.
"What an incredible lesson that is," Obama said, calling Mandela "one of the greatest people in history".
Obama had said on Thursday he did not "need a photo op" with Mandela, whom he met in 2005 in Washington when he was a U.S. senator.
"BOUND BY HISTORY"
After holding talks with Obama, Zuma said Mandela's critical condition was unchanged. "We hope that very soon he will be out of hospital," he added, without giving further details.
In welcoming Obama, Zuma underscored the historical similarities between Mandela and his U.S. guest in overcoming decades of institutionalized racism and discrimination to rise to the highest political office.
"The two of you are also bound by history as the first black presidents of your respective countries," Zuma said. "You both carry the dreams of the millions of people in Africa and the diaspora."
On Sunday, Obama flies to Cape Town from which he will visit Robben Island, the windswept former penal colony in the frigid waters of the south Atlantic where Mandela spent 18 of his 27 years in apartheid jails.
Zuma said Mandela had told him before his latest hospitalization that "when I go to sleep I will be very happy because I left South Africa going forward".