Media caption Mr Obama wrote in the guest book: "The world is grateful for the heroes of Robben Island" 
 
 US President Barack Obama has toured Robben Island - the jail in which Nelson Mandela was kept for 18 years. 
 
 He said he and his family were "deeply humbled" to visit the prison once inhabited by Mr Mandela - who remains critically ill in hospital. 
 
 Mr Obama went on to give a speech at the University of Cape Town and launch a multi-billion-dollar electricity initiative. 
 
 The US leader did not visit Mr Mandela, but met the Mandela family in private. 
 
 Security was stepped up during this final Cape Town leg of his time in South Africa, following clashes on Saturday between riot police and anti-Obama protesters in Soweto. 
 
 At the scene More than three weeks after Nelson Mandela was taken to Medi-Clinic Heart Hospital in Pretoria, there is still a steady stream of well-wishers leaving flowers and tributes to add to the huge collection outside the gates. On Sunday morning, two church groups were singing hymns, while veterans from Umkhonto we Sizwe (MK), the ANC's armed wing set up by Mr Mandela, arrived with a portrait of their founder wearing a military uniform. The tributes come from around the world - Pakistan, Mexico and France - as well as several African countries. And in a testimony to Mr Mandela's dream of creating a rainbow nation, all of South Africa's racial groups were represented. As she left a bunch of white chrysanthemums, Raksha Daya said that like many South Africans, she connects with the former president on a deeply personal level, like a grandfather. "It's a sense of love." 
 
 'Heroes' 
 
 Mr Obama and the first family visited Mr Mandela's bleak cell as well as the lime quarry - overlooked by a concrete watchtower - where anti-apartheid fighters including Mr Mandela were forced to undertake hours of back-breaking labour. 
 
 Mr Mandela was at the prison for 18 years and his long history of lung problems can be traced to the tuberculosis he contracted there - which he attributed to the dampness of his cell. 
 
 Later, Mr Obama wrote in the guest book in the prison courtyard: "On behalf of our family, we're deeply humbled to stand where men of such courage faced down injustice and refused to yield. 
 
 "The world is grateful for the heroes of Robben Island, who remind us that no shackles or cells can match the strength of the human spirit." 
 
 Mr Obama also visited a community project before delivering a keynote address at the University of Cape Town. 
 
 It was the same venue where 47 years ago, US Senator Robert Kennedy gave his famed "ripple of hope" speech, which gave inspiration to those fighting the racially divisive policies of apartheid rule and linked their struggle with that of the US civil rights movement. 
 
 Mr Obama paid tribute to South Africa's achievements over the past two decades but urged young Africans to fulfil Mr Mandela's legacy. 
 
 "Nelson Mandela showed us that one man's courage can move the world,'' he said. 
 
 More needed to be done to tackle poverty and disease, he said, adding that fear too often prevailed in Africa. For as long as war raged, democracy and economic opportunity could not take hold, he said. 
 
 Nelson Mandela: Key dates 1918 Born in the Eastern Cape 
 
 Born in the Eastern Cape 1944 Joins African National Congress 
 
 Joins African National Congress 1956 Charged with high treason, but charges dropped 
 
 Charged with high treason, but charges dropped 1962 Arrested, convicted of sabotage, sentenced to five years in prison 
 
 Arrested, convicted of sabotage, sentenced to five years in prison 1964 Charged again, sentenced to life 
 
 Charged again, sentenced to life 1990 Freed from prison 
 
 Freed from prison 1993 Wins Nobel Peace Prize 
 
 Wins Nobel Peace Prize 1994 Elected first black president 
 
 Elected first black president 1999 Steps down as leader BBC History: Mandela's defiant freedom speech 
 
 Mr Obama also announced a $7bn (£4.6bn) five-year initiative to double access to electricity in sub-Saharan Africa, in partnership with African countries and the private sector. 
 
 Mr Obama arrived in South Africa from Senegal on Friday. On Monday, he is travelling to Tanzania, the final stage of his African tour. 
 
 Family row 
 
 Meanwhile Mr Mandela's grandson, Mandla, has said he will oppose a court action brought by the rest of the family, seeking to exhume the bodies of his father, Makgatho, two of Nelson Mandela's daughters and two other relatives. 
 
 The rest of the family want the remains to be reburied in Qunu, where the former South African president wants to be laid to rest, while Mandla, an ANC MP, wants them to stay in the nearby village of Mvezo, Nelson Mandela's birthplace, where he is building a museum dedicated to his grandfather. 
 
 South Africa's Sunday Times newspaper quotes local chiefs in the area as saying that Madiba, as Nelson Mandela is known in the country, will not be at peace until this issue is resolved. 
 
 On Friday, a court granted an interim action saying the bodies could be exhumed and reburied but Mandla Mandela says he was not aware of the case until it was reported in the media and he is now opposing it. 
 
 Image caption US President Barack Obama and his family have toured Robben Island, the apartheid-era prison island off Cape Town where Nelson Mandela and other resistance leaders were held, and which is now a museum. 
 
 Image caption Their tour included a visit to the quarry where prisoners, including Mr Mandela, were required to labour. 
 
 Image caption Mr Obama spent some time in Mr Mandela's former cell. 
 
 Image caption He signed the visitors' book under the gaze of a now disused watchtower. ||||| President Barack Obama on Sunday will announce a new initiative to double access to electric power in sub-Saharan Africa, part of his effort to build on the legacy of equality and opportunity forged by his personal hero, Nelson Mandela. 
 
 U.S. President Barack Obama, right, and his family visit the rock quarry where prisoners of Robben Island were once forced to work during a tour of Robben Island, South Africa, Sunday, June 30, 2013.... (Associated Press) 
 
 U.S. President Barack Obama, right, and first lady Michelle Obama tour Robben Island, South Africa, Sunday, June 30, 2013. Robben Island is an historic Apartheid-era prison that held black political prisoners,... (Associated Press) 
 
 RETRANSMISSION TO CORRECT SPELLING OF PRESIDENT'S FIRST NAME - U.S. President Barack Obama U.S. peers out from Section B, prison cell No. 5, on Robben Island, South Africa, Sunday, June 30, 2013. This... (Associated Press) 
 
 From left, first lady Michelle Obama, Sasha Obama, Ahmed Kathrada former prisoner with Nelson Mandela guiding the tour, U.S. President Back Obama, Marian Robinson and Leslie Robinson, look out over the... (Associated Press) 
 
 From left, Ahmed Kathrada former prisoner with Nelson Mandela, points out into the courtyard as he gives a tour to Marian Robinson, Malia Obama, U.S. President Back Obama, first lady Michelle Obama and... (Associated Press) 
 
 RETRANSMISSION TO CORRECT SPELLING OF PRESIDENT'S FIRST NAME - U.S. President Barack Obama U.S. looks around Section B, prison cell No. 5, on Robben Island, South Africa, Sunday, June 30, 2013. This was... (Associated Press) 
 
 Children look at photographs of former South African President Nelson Mandela, top, and U.S. President Barack Obama, bottom, with messages from well-wishers outside the Mediclinic Heart Hospital where... (Associated Press) 
 
 A note written by U.S. President Barack Obama and signed by both him and first lady Michelle Obama after they toured Robben Island, is seen on a guestbook at Robben Island, South Africa, Sunday, June... (Associated Press) 
 
 RETRANSMISSION TO CORRECT SPELLING OF PRESIDENT'S FIRST NAME - U.S. President Barack Obama walks from Section B, prison cell No. 5, on Robben Island, South Africa, Sunday, June 30, 2013. This was former... (Associated Press) 
 
 Obama, who flew from Johannesburg to Cape Town on Sunday, is paying tribute to the ailing 94-year-old Mandela throughout the day. The president and his family visited Robben Island, where the anti-apartheid leader spent 18 years confined to a tiny cell, including a stop at the lime quarry where Mandela toiled and developed the lung problems that sent him to the hospital for most of the month. 
 
 The White House said Obama's guide during the tour was 83-year-old South African politician Ahmed Kathrada, who also was held at the prison for nearly two decades and guided Obama on his 2006 visit to the prison as a U.S. senator. The president also saw the prison courtyard where Mandela planted grapevines that remain today, and where he and others in the dissident leadership would discuss politics, sneak notes to one another and hide writings. 
 
 "On behalf of our family, we're deeply humbled to stand where men of such courage faced down injustice and refused to yield. The world is grateful for the heroes of Robben Island, who remind us that no shackles or cells can match the strength of the human spirit," Obama wrote in the guest book in the courtyard, his U.S. Secret Service agents standing watch in the old guard tower above. 
 
 During the tour, which took place under sunshine and clear, blue skies, Obama, first lady Michelle Obama and daughters Malia and Sasha 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 labor" 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. As the family turned to leave, Obama asked Kathrada to tell his daughters how the African National Congress, the South African political party, got started. 
 
 After the tour, Obama visited retired archbishop Desmond Tutu at a youth center run by his HIV foundation before delivering what the White House has billed as the signature speech of the president's weeklong trip, an address at the University of Cape Town that will be infused with memories of Mandela. 
 
 Obama will use the address to unveil the "Power Africa" initiative, which includes an initial $7 billion investment from the United States over the next five years. Private companies, including General Electric and Symbion Power, are making an additional $9 billion in commitments with the goal of providing power to millions of Africans crippled by a lack of electricity. 
 
 Gayle Smith, Obama's senior director for development and democracy, said more than two-thirds of people living in sub-Saharan Africa do not have electricity, including 85 percent of those living in rural areas. 
 
 "If you want lights so kids can study at night or you can maintain vaccines in a cold chain, you don't have that, so going the extra mile to reach people is more difficult," Smith said. 
 
 The U.S. and its private sector partners initially will focus its efforts on six countries: Ethiopia, Ghana, Kenya, Liberia, Nigeria and Tanzania, where Obama will wrap up his trip later this week. Former President George W. Bush, who supports health programs throughout the continent, will also be in Tanzania next week, and the White House did not rule out the possibility that the two men might meet. 
 
 Obama will also highlight U.S. efforts to bolster access to food and health programs on the continent. His advisers said the president sees reducing the poverty and illness that plague many parts of Africa as an extension of Mandela's example of how change can happen within countries. 
 
 The former South African president has been hospitalized in critical condition for three weeks. Obama met Saturday with members of Mandela's family, but did not visit the anti-apartheid icon, a decision the White House said was in keeping with his family's wishes. 
 
 Obama's weeklong trip, which opened last week in Senegal, marks his most significant trip to the continent since taking office. His scant personal engagement has come as a disappointment to some in the region, who had high hopes for a man whose father was from Kenya. 
 
 Obama visited Robben Island when he was a U.S. senator. But since being elected as the first black American president, Obama has drawn inevitable comparisons to Mandela, making Sunday's visit particularly poignant. 
 
 The president said he was eager to bring his family with him to the prison to teach them about Mandela's role in overcoming white racist rule, first as an activist and later as a president who forged a unity government with his former captors. 
 
 He told reporters Saturday he wanted to "help them to understand not only how those lessons apply to their own lives but also to their responsibilities in the future as citizens of the world, that's a great privilege and a great honor." 
 
 Ben Rhodes, Obama's deputy national security adviser, said Mandela's vision was always going to feature prominently in the speech. But his deteriorating health "certainly puts a finer point on just how much we can't take for granted what Nelson Mandela did." 
 
 Harkening back to a prominent theme from Obama's 2009 speech in Ghana _ his only other trip to Africa as president _ Obama will emphasize that Africans must take much of the responsibility for finishing the work started by Mandela and his contemporaries. 
 
 "The progress that Africa has made opens new doors, but frankly, it's up to the leaders in Africa and particularly young people to make sure that they're walking through those doors of opportunity," Rhodes said. 
 
 Obama will speak at the University of Cape Town nearly 50 years after Robert F. Kennedy delivered his famous "Ripple of Hope" speech from the school. Kennedy spoke in Cape Town two years after Mandela was sentenced to life in prison. 
 
 ___ 
 
 Follow Nedra Pickler and Julie Pace on Twitter: http://www.twitter.com/nedrapickler and http://www.twitter.com/jpaceDC
– President Obama may not get to see Nelson Mandela, but he paid tribute to the apartheid icon today by visiting the bleak prison cell where Mandela spent 18 years of his prison term, reports the BBC. Writing in the Robben Island prison guest book that he was "deeply humbled," Obama praised Robben's "heroes, who remind us that no shackles or cells can match the strength of the human spirit." Mandela, 94, remains in critical condition with the very lung problems he contracted during his time in the prison. Obama moves on to the University of Cape Town later today, where the AP notes that he'll unveil a $7 billion, five-year initiative to double access to South Africa's power grid.