US President Barack Obama, on his first visit to sub-Saharan Africa since taking office, has urged Africans to take a leading role in tackling the region's problems.
In a speech in Ghana, Mr Obama spoke of a "new moment of promise" but stressed that Africans must also take greater responsibility for stamping out war, corruption and disease plaguing the continent.
He said good governance was the change that could unlock Africa's potential.
The US president took aim at corruption and rights abuses on the continent, warning that growth and development would be held back until such problems were tackled.
He said America would not impose any system of government, but would increase help for those behaving responsibly.
The visit has enormous resonance for Africa because of Barack Obama's roots as the son of Kenyan immigrant. He laced his speech with tales of his background and the struggles of his forebears in the face of poverty and colonial rule.
MPs chanted "yes, we can" before Mr Obama started his address to the parliament of Ghana, and the president ended his address with that phrase - his old campaign slogan.
Mr Obama said before leaving Italy earlier on Friday that he was visiting Ghana partly because of its "functioning democracy" and "a president who's serious about reducing corruption".
Ghanaians, many dressed in Obama t-shirts, packed into the streets of Accra in hope of glimpsing the president. They clustered around television sets in homes, bars and backyards to follow his words.
The US president flew by helicopter to Cape Coast Castle, a former depot of the transatlantic slave trade and a reminder of one of the darkest chapters in African and American history.
Mr Obama's wife Michelle is descended from slaves shipped from Africa. The president, his wife and their two daughters were to spend less than 24 hours in Ghana before returning to the United States.
Mr Obama flew out of Rome on Friday after attending the G8 summit in L'Aquila and meeting Pope Benedict XVI at the Vatican.