The US president, whose father was Kenyan and who called the visit "particularly meaningful," said these conflicts needed a global response.
"Africa's future is up to Africans," Obama said in a keynote speech to the Ghanaian parliament which he hoped would resonate across the continent, before visiting a former fort from where countless slaves were shipped to the Americas.
But the US leader, who left Ghana on Saturday night, added many warnings to Africa's leaders and its people.
"Development depends upon good governance. That is the ingredient which has been missing in far too many places, for far too long," he said.
"That is the change that can unlock Africa's potential. And that is a responsibility that can only be met by Africans."
"Repression takes many forms, and too many nations are plagued by problems that condemn their people to poverty. No country is going to create wealth if its leaders exploit the economy to enrich themselves, or police can be bought off by drug traffickers.
"Africa doesn't need strongmen, it needs strong institutions," he declared to applause.
Before departing Ghana for Washington, Obama said the visit had been meaningful.
"As somebody whose father comes from Africa I am pleased this visit has been particularly meaningful for me," he said.
He and his wife Michelle, a descendant of African slaves, as well as their daughters Malia and Sasha, toured Cape Coast Castle, once one of Africa's main outposts from where slaves were shipped to the Americas.
Obama described the tour as "a moving experience".
He had earlier condemned African tyrants who enrich themselves and urged Africans to demand stronger governments and accountability.
"Africa is not the crude caricature of a continent at war. But for far too many Africans, conflict is a part of life, as constant as the sun.
"There are wars over land and wars over resources. And it is still far too easy for those without conscience to manipulate whole communities into fighting among faiths and tribes. These conflicts are a millstone around Africa's neck."
Obama offered diplomatic, technical and logistical support for efforts to improve security and "to hold war criminals accountable".
The US president also spoke of a "comprehensive, global health strategy" to help Africa confront the AIDS pandemic and other diseases which kill millions each year on the continent.
He visited a government-run hospital in Accra which receives US aid to help fight malaria and diseases affecting children and women.
"When children are being killed because of a mosquito bite, and mothers are dying in childbirth, then we know that more progress must be made," he said.
Obama called on western nations to open up their markets to African goods to help their economies.
He said it was up to Africa's young people, in countries where they make up more than half the population, to change the continent.
"You have the power to hold your leaders accountable, and to build institutions that serve the people," he said. "Yes you can," he declared in a variation of his election campaign slogan.
Obama was warmly received in Ghana by thousands of people who poured onto the streets of the capital to catch a glimpse of him.
He chose Ghana as his first trip to sub-Saharan Africa because it was an example of a "functioning democracy" in a conflict-scarred continent.
Crowds waved flags and placards with slogans such as "Obama you are the true son of Africa, we love you."
------------------------------------------------------------------------------------------------------------------------
"Africa's future is up to Africans," Obama said in a keynote speech to the Ghanaian parliament which he hoped would resonate across the continent, before visiting a former fort from where countless slaves were shipped to the Americas.
But the US leader, who left Ghana on Saturday night, added many warnings to Africa's leaders and its people.
"Development depends upon good governance. That is the ingredient which has been missing in far too many places, for far too long," he said.
"That is the change that can unlock Africa's potential. And that is a responsibility that can only be met by Africans."
"Repression takes many forms, and too many nations are plagued by problems that condemn their people to poverty. No country is going to create wealth if its leaders exploit the economy to enrich themselves, or police can be bought off by drug traffickers.
"Africa doesn't need strongmen, it needs strong institutions," he declared to applause.
Before departing Ghana for Washington, Obama said the visit had been meaningful.
"As somebody whose father comes from Africa I am pleased this visit has been particularly meaningful for me," he said.
He and his wife Michelle, a descendant of African slaves, as well as their daughters Malia and Sasha, toured Cape Coast Castle, once one of Africa's main outposts from where slaves were shipped to the Americas.
Obama described the tour as "a moving experience".
He had earlier condemned African tyrants who enrich themselves and urged Africans to demand stronger governments and accountability.
"Africa is not the crude caricature of a continent at war. But for far too many Africans, conflict is a part of life, as constant as the sun.
"There are wars over land and wars over resources. And it is still far too easy for those without conscience to manipulate whole communities into fighting among faiths and tribes. These conflicts are a millstone around Africa's neck."
Obama offered diplomatic, technical and logistical support for efforts to improve security and "to hold war criminals accountable".
The US president also spoke of a "comprehensive, global health strategy" to help Africa confront the AIDS pandemic and other diseases which kill millions each year on the continent.
He visited a government-run hospital in Accra which receives US aid to help fight malaria and diseases affecting children and women.
"When children are being killed because of a mosquito bite, and mothers are dying in childbirth, then we know that more progress must be made," he said.
Obama called on western nations to open up their markets to African goods to help their economies.
He said it was up to Africa's young people, in countries where they make up more than half the population, to change the continent.
"You have the power to hold your leaders accountable, and to build institutions that serve the people," he said. "Yes you can," he declared in a variation of his election campaign slogan.
Obama was warmly received in Ghana by thousands of people who poured onto the streets of the capital to catch a glimpse of him.
He chose Ghana as his first trip to sub-Saharan Africa because it was an example of a "functioning democracy" in a conflict-scarred continent.
Crowds waved flags and placards with slogans such as "Obama you are the true son of Africa, we love you."
------------------------------------------------------------------------------------------------------------------------