President Barack Obama said he was "deeply humbled" by a visit to the cell where Nelson Mandela spent years as a prisoner, in a solemn homage Sunday to the critically ill hero he was unable to see in Pretoria.
The US leader paid tribute to Mandela and other anti-apartheid inmates of Robben Island, who "refused to yield" in the face of racist white minority rule.
Obama, accompanied by his wife Michelle and young daughters Sasha and Malia, visited the bleak lime quarry where 34 anti-apartheid leaders — including Mandela — endured hours of backbreaking work.
He stood alone, looking out the barred window of the small cell where Mandela spent two-thirds of his 27 years in prison, the darkest days of his detention.
After touring the sandy wind-swept island, Obama took a few minutes to write a note in the visitors book.
"On behalf of our family we're deeply humbled to stand where men of such courage faced down injustice and refused to yield," he wrote.
Current South African President Jacob Zuma was also held at the notorious jail off Cape Town's coast under the apartheid regime, which ended in 1994 with Mandela's election victory.
In sunny weather, the US president flew by helicopter with his family to the island, which is surrounded by the frigid, shark-infested waters of the South Atlantic.
His party drove a short distance to the former prison's lime quarry, where Mandela and other prisoners toiled for years.
Their guide, 83-year-old former inmate and anti-apartheid activist Ahmed Kathrada, spoke about his time there with Mandela and other African National Congress prisoners.
Obama told his daughters the idea of non-violent resistance, an important tactic in the US civil rights movement, had taken root in South Africa where its chief proponent Mahatma Gandhi worked as a lawyer before returning to India.
During the tour Obama, first lady Michelle Obama and their daughters took in the expansive view of the quarry, a huge crater with views of the rusty guard tower from where Mandela was watched.
Obama commented on the "hard labour" Mandela endured and asked Kathrada to remind his daughters how long Mandela was in prison.
Michelle Obama asked how often Mandela would work and was told he worked daily.
The 94-year-old Mandela's struggle with a lung infection has been a sombre backdrop to Obama's eight-day Africa trip. South Africa says his condition is "critical but stable".
Additional reporting by Associated Press