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.