Speaking at a packed University of Cape Town, Obama, who greeted the guests in various South African languages, said his administration will start by investing $7 billion in resources and partner with the private sector, who have committed more than $9 billion in investment.

He said energy was important for Africa’s growth and development

“We’ll reach more households not just in cities, but in villages and on farms. We’ll expand access for those who live currently off the power grid. And we’ll support clean energy to protect our planet and combat climate change.

“So, a light where currently there is darkness; the energy needed to lift people out of poverty -- that’s what opportunity looks like.”

Building young leaders

He also called on the young people to change the continent’s future, saying the world will be watching what decisions they make for the continent, which he said was starting to realise opportunities for resources, investment, partnership and influence.

“There is no question that Africa is on the move, but it's not moving fast enough for the child still languishing in poverty in forgotten townships. It's not moving fast enough for the protester who is beaten … or the woman who is raped ... We've got more work to do because these Africans must not be left behind.”

Obama said that is where the youth comes in.

“You get to decide where the future lies … demographics means young people are going to be determining the fate of this continent and this country. You’ve got time and numbers on your side, and you’ll be making decisions long after politicians like me have left the scene.”

Turning on America’s vision for Africa, Obama said it was a partnership that unleashes growth and the potential of every citizen, not just a few at the very top.

He said his own country would “benefit enormously” if the African continent reached its full potential.

If prosperity was broadly shared in Africa, Obama said that the middle class would be an enormous market for US goods.

“If strong democracies take root, that will enable our people and businesses to draw closer to yours. If peace prevails over war, we will all be more secure.

“And if the dignity of the individual is upheld across Africa, then I believe Americans will be more free as well because I believe that none of us are fully free when others in the human family remain shackled by poverty, disease or oppression,” Obama told the cheering crowd.

He announced that he will soon invite heads of state from Africa to the US for an upcoming summit, which he said would mark a new chapter in US-Africa relations.

Before the address, Obama had made a stop at Robben Island where Nelson Mandela was imprisoned.

Obama, who has labelled Mandela as his personal hero, started his UCT speech on a sombre note as he acknowledged the ailing former President.

He said his health “weighs heavily on our hearts”.

He added that his first interest in political activism was a result of the struggle over apartheid in SA.

Obama said SA has shown the world how the power of human beings can affect change.

“You’ve shown us how a prisoner can become a President. You've shown us how bitter adversaries can reconcile. You've confronted crimes of hatred and intolerance with truth and love, and you wrote into your Constitution the human rights that sustain freedom.”

US President Barack Obama will today travel to Tanzania for the last leg of his African tour He will hold talks and a press conference with President Jakaya Kikwete lay a wreath at a memorial to those killed in the USA embassy bombing in 1998 and visit the Ubongo power plant Last night the US President announced a new 7 billion programme dubbed Power Africa which will enhance Africa’s electric power networks