In a robust speech at the Kotoka International Airport shortly before departing Ghana after a whirlwind 22-hour visit, President Barack Obama described how his first visit to sub-Saharan Africa as president had real poignance for him.
"As somebody whose father comes from Africa, obviously this visit has been particularly meaningful for me," Obama said.
A source close to the president said the trip was particularly meaningful to Obama for two personal reasons. First, "It t meant a lot to him" to visit the Cape Coast Castle, a former slave port, with his daughters "and to teach them about what happened there."
Second, the president believes that because of his unique status as the first African-American U.S. president, he has a "more powerful voice," the source said, when pushing African nations to get their own houses in order by embracing democratic, good governance and anti-corruption reforms.
Shortly after visiting the Cape Coast castle, the president told the local crowd -- comprised of thousands of Ghanaians and Peace Corps workers gathered at the airport -- that the images of his visit were lasting.
"I'll never forget the image of my two young daughters, the decedents of Africans and African-Americans walking through those Doors of No Return and then walking back through those Doors of Return," the president said. "It was a remarkable reminder that while the future is unknown, the winds always blow in the direction of human progress."
Standing with Ghanaian President John Atta Mills, in closing remarks which at times felt more like a campaign speech, President Obama reaffirmed to the Ghanaians gathered the "proud" relationship between the U.S. and their country.
"At each point of our visit here, I was reminded of the enduring bond between our nations," he said. "Men and woman taken from this nation help to build my own. Today many of our leading citizens trace their roots to these shores."
The president said their partnership is not just based on shared ideals, but also in "ideals forged in struggles for independence that made our countries who they are. We believe that democracy is not simply a gift from previous generations but a responsibility for each generation to preserve and to pass on. We believe that no one, whether through the influence of poverty, politics, the power of money or the fear of force is above the law."
Ghanaians were eagerly awaiting Obama's visit, but there was some grumbling that the trip was too short and that the president did not hold a large public event in Accra, as former presidents Bill Clinton and George W. Bush did on trips to Ghana.
"All Ghanians want to see you," President Mills said after his meeting with Obama. "I wish it were possible for me to send you to every home in Ghana."
U.S. embassies across Africa held screenings of the president's speech in Ghana. In Kenya, the home of Obama's father, the leading cell phone provider coordinated with the State Department to provide streaming video to its 17 million subscribers.
Standing with his family earlier in the day at the Cape Coast Castle, an emotional Obama on Saturday said his daughters needed to see the fortification to be reminded of the evil that exists in the world.
The president called it "particularly important for Malia and Sasha, who are growing up in such a blessed way, to be reminded that history can take very cruel turns," said the president, whose wife is the great-great granddaughter of slaves in South Carolina. "And hopefully one of the things that was imparted to them during this trip is their sense of obligation to fight oppression and cruelty wherever it appears and that any group of people who are degrading another group of people have to be fought against with whatever tools we have available to us."
The president said his tour of the three-story castle was "reminiscent" of his recent trip to the Buchenwald concentration camp in Germany "as it reminds us of capacity of human beings to commit great evil."
He called it "striking" that "right above one of the dungeons where male captives were kept was a church. And that reminds us that sometimes we can tolerate and stand by a great evil even as we think that we are doing good."
Loudspeakers had been set up outside the castle so the thousands gathered could hear the remarks of the first African-American U.S. president. Tens of thousands lined the streets to the castle from the landing zone where Obama's helicopter from Accra arrived.
Many wearing Obama T-shirts and chanting the president's name, Ghanaians cheered his arrival from rooftops, leaning out of windows, and hanging from scaffolding. At one moment, hundreds began chasing the motorcade until they were stopped by security.
"As Americans, and as African Americans obviously there's a -- there's a special sense that on the one hand this place was a place of profound sadness," said Obama. "On the other hand it is here where the journey of much of the African-American experience began."
At one point in his family's tour of the facility, the guide showed them the Door of No Return, through which slaves would pass, never to return to Africa again. Obama had his arm around his 8-year-old daughter Sasha, while first lady Michelle Obama held hands with 11-year-old Malia.
In remarks to children during February's celebration of Black History Month, the first lady noted that "African-American slaves helped to build this house" in which the first African-American first family of the United States now resides.
The president said today that "symbolically to be able to come back with my family, with Michelle and our children and see the portal through which the diaspora began -- but also to be able to come back here in celebration with the people of Ghana of the extraordinary progress that we've made because of the courage of so many black and white to abolish slavery and ultimately win the civil rights for all people -- I think is, is a source of hope."
The president seemed to be overcome with emotion as his made these remarks, pausing to collect his composure.
"It reminds us that as bad as history can be, it's also possible to overcome," he said.
The first family participated in the unveiling of a plaque now hanging outside the male slave dungeons that reads: "This plaque was unveiled by President Barack Obama and the First Lady Michelle Obama of the United States of America on the occasion of their visit to the Cape Coast Castle on the 11th day of July 2009."
Acknowledging "the tragic past that has sometimes haunted this part of the world," President Barack Obama told Africans that they needed to move beyond historical grievances about colonialism and exploitation by the West to move the continent into the 21st century.
"It is easy to point fingers and to pin the blame" for disease and conflict in Africa on others, the president told Ghanaian leaders at the Accra International Conference Center. "Yes, a colonial map that made little sense bred conflict, and the West has often approached Africa as a patron, rather than 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 president made sure that his message of tough love was accompanied by an assertion of his credentials as a direct descendant of Africans.
"I have the blood of Africa within me, and my family's own story encompasses both the tragedies and triumphs of the larger African story," he said, detailing how his paternal grandfather, Hussein Onyongo Obama, a cook for the British in Kenya, was called "boy" for much of his life and was imprisoned briefly.
The president's father, Barack Obama Sr., illustrated a different lesson -- the promise and failure of Africa's renaissance in the 1950s and '60s. The former goat herder "came of age at an extraordinary moment of promise for Africa," and he traveled to the United States for an education.
But "tribalism and patronage" in Kenya "for a long stretch derailed his career," the president said. "And we know that this kind of corruption is a daily fact of life for far too many."
While Kenya had a "per capita economy larger than South Korea's when I was born," Obama added, that has changed for the worse.
The message was a more public version of the story that he shared privately with African leaders at the G8 summit in L'Aquila on Friday.
In a meeting on Friday with the leaders of Egypt, Algeria, Senegal, Nigeria, Libya and Ethiopia, Obama spoke about his personal connections to both Africa and poverty, and challenged the leaders to set priorities for combating poverty and hunger. According to a top White House aide, "You could have heard a pin drop."
Deputy National Security Adviser Michael Froman told reporters the president wanted to make it clear to the African leaders that problems "that Africans face weren't just a product of colonialism or past history. ... This wasn't a time to make excuses. And that it was important to join together in a clear-eyed way."
The president said today that he had come to Ghana, his final stop on a six-day trip, after international summits in Italy and Russia, "for a simple reason: The 21st century will be shaped by what happens not just in Rome or Moscow or Washington, but by what happens in Accra as well."
Aides said the goal of the trip was to send a message to Africans to follow Ghana's example of democracy and good governance, and to the larger world that Africa is not just a place of warfare, disease and famine.
In their first-ever meeting this morning, President Obama praised Ghanaian President John Atta as "a democratic leader who did it the right way," praising the "institutions that are sustaining democracy and openness and transparency," and adding that, "we think that Ghana can be an extraordinary model for success throughout the continent."
Obama said he wanted to make the stop here in West Africa after he completed the G-8 summit and his meetings in Moscow as a way to "emphasize that Africa is not separate from world affairs."
"There's been a tendency for U.S. presidents to take a week sometimes during their term and there is a separate trip to Africa," he said. "And we wanted to send a message that we have a continuing interest on the security, on the economy and the social, political development because we live in an interrelated world and what happens here has an impact everywhere."
The White House chose Ghana over other African nations, including Kenya, where Obama's father came from, to showcase a successful African democracy.
Obama's mention of Kenya in his address today as being "badly outpaced" capped a week of pointed criticism at the country's leadership; criticism many Kenyans agree with.
In local television analysis, Kenyan political analyst Kwamchetsi Makokha called the speech "a lecture" for African leaders. He said Kenyan President Mwai Kibaki should have been "squirming in his seat" listening to the speech because Obama "basically berated the Kenyan leadership."
"If you're a Kenyan and you listened to the part of the speech where he spoke about democracy, and then he also spoke about opportunity, and when spoke about conflicts and peaceful resolution of disputes, you would be cringing at every opportunity," said Makokha. "On each of those counts our administration is guilty."
The scene outside the Mills and Obama meeting at the presidential castle was one of enthusiasm and celebration. Every living past president of Ghana and hundreds of Ghanaians in colorful garb cheered as a song, "Barack Obama" by the reggae group Blakk Rasta, blared.
"Barack, Barack, Barack Obama," went the song's refrain, with interesting stanzas such as "As you keep the fire burning, black president" and "judgment will come with Barack for legalizing unnecessary abortions in Africa."
The second track on the CD after "Barack Obama" is called "Cocaine in the Palace."
As the presidents arrived in the tent, an announcer attempted to pump up the crowd.
"The first black president of the United States!" he boomed. "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."
Obama is the third consecutive American president to visit Ghana. Bill Clinton spoke to an enthusiastic audience of hundreds of thousands in Accra in 1998. George W. Bush visited here in 2008, and a highway here is named in his honor.
Obama and his wife, first lady Michelle Obama, visited a hospital in Accra that focuses on maternal and child health care. The Obamas met with doctors and nurses and held several babies, which the president called a highlight of the trip.
"Look at these cuties," he said.
ABC News' Dana Hughes contributed to this report.