US President Barack Obama has urged the continent's leaders to prioritize creating jobs and opportunity for the next generation of young people or risk sacrificing future economic potential to further instability and disorder.

He said the "urgent task" of generating jobs for a population that is expected to double to around 2 billion people in the coming decades will be "an enormous undertaking." But he said it can be achieved with U.S. help.

In his speech at the  African Union Headquarters in Addis Ababa, Ethiopia to mark the end of a five-day visit to Africa, President Obama said “Economic relationships cannot simply be about other countries building infrastructure with foreign labor or extracting Africa’s natural resources.  Real economic partnerships have to be a good deal for Africa - they have to create jobs and capacity for Africans.  That’s the kind of partnership America offers.”

"Africa will need to generate millions more jobs than it is doing now," Obama said in a speech to the entire continent delivered from the headquarters of the African Union, a member organization of African nations. "And time is of the essence."

"Alongside high-tech hubs of innovation, many Africans are crowded into shanty towns without power or running water - a level of poverty that’s an assault on human dignity," he said.

"The choices made today will shape the trajectory of Africa and therefore the world — for decades to come," said Obama, who is seen by the people of Africa as one of their own. It was the first speech to the AU by a sitting American president.

Obama also called on Africa's leaders to make their countries more attractive to foreign investment by cleaning up corruption, upholding democratic freedoms, supporting human rights, and willingly and peacefully leaving office when their terms expire.

"Here in Africa, corruption drains billions of dollars from economies - money that could be used to create jobs and to build hospitals and schools.  And when someone has to pay a bribe just to start a business or go to school or to get an official to do their job - that’s not “the African way” - it undermines the dignity of the people you represent.” he said.