ACCRA, Ghana — America's president and Africa's son, Barack Obama dashed with pride onto the continent of his ancestors Saturday, challenging its people to shed corruption and conflict in favor of peace. Campaigning to all of Africa, he said "Yes you can."

"I say this knowing full well the tragic past that has sometimes haunted this part of the world," Obama told a riveted Ghanaian Parliament. "I have the blood of Africa within me."

In the faces of those who lined the streets and in many of Obama's own words, this trip was personal. Beyond his message, the story was his presence — the first black U.S. president coming to poor, proud, predominantly black sub-Sahara Africa for his first time in office.

The emotional touchstone of his visit: a tour of Cape Coast Castle, the cannon-lined fortress where slaves were kept in squalid dungeons, then shipped in chains to America through a "Door of No Return" that opens to the sea.

Obama absorbed the experience with his wife, Michelle, and their girls, Sasha and Malia.

"I'll never forget the image of my two young daughters, the descendants of Africans and African-Americans, walking through those doors of no return but then walking back (through) those doors," he said later at a grand departure ceremony. "It was a remarkable reminder that, while the future is unknowable, the winds always blow in the direction of human progress."

Ghanaians lined up on the tarmac lingered for a time even after Air Force One disappeared into the nighttime sky. Obama arrived back in the U.S. early Sunday.

At the heart of Obama's message here: African nations crippled by coups and chaos, like Ghana has been in the past, can reshape themselves into lawful democracies. He said it takes good governance, sustained development, improved health care.

License to speak bluntly
The son of a white woman from Kansas and a black man from Kenya, Obama bluntly told Africa to take more responsibility for itself but proclaimed: "America will be with you."

Sub-Saharan Africa is one of the poorest places in the world.

Obama also got openly personal — recalling the grandfather who endured being called "boy" as a cook for the British in Kenya, the father who once herded goats in a small Kenyan village. Not mentioned was the path of his wife, Michelle, who is a descendant of slaves.

In essence, Obama's history with Africa seemed to give him freer license to speak about the continent, as if he were being honest with a friend. He gave an unsentimental account of squandered opportunities, brutality and bribery in postcolonial Africa.

About every time Obama cited his basic argument — that democracy is about more than holding elections, that Africa resist the drug trade and enforce a rule of law — members of Parliament raucously cheered him on. Then again, this audience was friendly. When Obama left, a choir sang a song to his campaign theme of "Yes we can," a line he used himself.

Evoking the memory of American civil rights giant Martin Luther King Jr., Obama noted that King was in Ghana in 1957 to hail Ghana's independence from the British. He quoted King as calling the moment a triumph of justice, and told young Africans they must remember that.

"You can conquer disease, end conflicts and make change from the bottom up," Obama said. "You can do that. Yes you can. Because in this moment, history is on the move."

All together, Obama was spending less than 24 hours in Ghana. But they packed in personal moments, in contrast to his summit-heavy travels across Russia and Italy over the last week.

At a maternal health clinic in Accra, he turned into a sentimental dad when he met a group of mothers holding newborns. "This is the highlight of the trip," he said, beaming.

By afternoon, he was contemplating the human capacity for evil at the castle, which served as a headquarters for the trans-Atlantic slave trade. Obama walked with his arm around Malia, 11. The first lady held the hand of Sasha, 8.

"Hopefully one of the things that was imparted to them during this trip was their sense of obligation to fight oppression and cruelty wherever it appears," the president said.

That reflects just how much the United States, which dwarfs Ghana's size, wants this country to be a model of democracy and invests tens of millions of tax dollars to help it.

But what the Obama White House did not want on this trip was the Bill Clinton moment. In 1998, on a blisteringly hot day, a crowd at a Clinton rally nearly caused a horrific trample.

That also affected why Obama did not hold an outdoor event of his own.

Obama will be back to Africa. But he suggested that he won't go for the traditional model of devoting a trip to Africa alone, as if it is separated from world affairs. Instead, African nations might be wrapped into his multinational travels more often.

"What happens here," he said, "has an impact everywhere."

Copyright 2009 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.