ACCRA, Ghana — President Obama traveled in his father’s often-troubled home continent on Saturday as a potent symbol of a new political era but also as a messenger with a tough-love theme: American aid must be matched by Africa’s responsibility for its own problems.
“We must start from the simple premise that Africa’s future is up to Africans,” Mr. Obama said in an address to Parliament that was televised across the continent. “I say this knowing full well the tragic past that has sometimes haunted this part of the world. After all, I have the blood of Africa within me, and my own family’s story encompasses both the tragedies and triumphs of the larger African story.”
But, he continued, Africa must put the past behind it. “It is easy to point fingers and to pin the blame for these problems on others,” he said. “Yes, a colonial map that made little sense helped to breed conflict. The West has often approached Africa as a patron, or a source of revenue, rather than as a partner. But the West is not responsible for the destruction of the Zimbabwean economy over the last decade or wars in which children are enlisted as combatants.”
The continent’s future, he said, depends on good governance, “which has been missing in far too many places for far too long.”
“That is the change that can unlock Africa’s potential,” he said. “And that is a responsibility that can be met only by Africans.”
The sight of the first black president of the United States, the son of a onetime African goat herder, electrified this small coastal nation and much of the region. Cheering crowds lined streets to catch a glimpse. Billboards with his picture dotted the city. His name and campaign theme became the refrains of songs played in his honor.
But while the history of the moment was lost on no one and Mr. Obama bathed in the rapturous welcome, he also delivered a strong and at times even stern message.
“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,” he said. “No business wants to invest in a place where the government skims 20 percent off the top, or the head of the port authority is corrupt. No person wants to live in a society where the rule of law gives way to the rule of brutality and bribery. That is not democracy, that is tyranny, and now is the time for it to end.”
“Africa doesn’t need strongmen,” he added. “It needs strong institutions.”
These words, had they come from any of his predecessors, might not have been received the same way. Instead, it was cast by the White House as hard truths from a loving cousin who could say what no one else could.
As he did in his address to the Muslim world in Cairo last month, he used the details of his biography to soften the sometimes blunt language.
“My grandfather was a cook for the British in Kenya,” he said, “and though he was a respected elder in his village, his employers called him ‘boy’ for much of his life.”
Accompanied by his wife and two daughters, Mr. Obama arrived here after high-powered summit meetings in Russia and Italy, making the case that even a one-day visit showed that Africa should be part of the world community rather than be relegated to a once-a-term weeklong journey.
He visited a women’s clinic to highlight American help in combating infant and maternal mortality and later flew by helicopter to Cape Coast Castle, a notorious slave port visited by Presidents Bill Clinton and George W. Bush but never a black commander in chief and a first lady who is a descendant of slaves.
The excitement over his visit was captured at a morning breakfast with dignitaries on the government compound. As Mr. Obama made his way down the center aisle with President John Atta Mills, a reggae song played in the background. “Barack, Barack, Barack Obama.”
An announcer kept up a steady patter of commentary. “The first black president of the United States!” he called out. “History! History! History is being made today in Ghana where democracy has become the watchword of all Ghanaian people. Africa meets one of its illustrious sons, Barack Obama.”
A minute later, he called out: “Africa be proud!”
And then: “Enjoy and savor the moment. History in the making!”
Although it was Mr. Obama’s first trip to sub-Saharan Africa as president, this visit was his fourth to the continent that has played a distant yet central role in his life, given that half of his bloodline comes from Kenya.
The first time he came, as a college student to discover his roots, he had little more than a backpack and train ticket. The arrival by Air Force One on Saturday, less than two decades later, underscored his rapid American rise.
But Mr. Obama’s ties to Africa barely go beyond biography. He met his father, a Kenyan, only once as a child, and he has written that he struggled to come to terms with his biracial upbringing as not a product of traditional African-American culture in the United States or as a native son of Africa.
Many Africans, however, have clearly been following this son of the diaspora with special interest. Before his speech to Parliament here, the legislators were chanting, “Yes, we can! Yes, we can!”