Updated

CAPE COAST, Ghana -- President Obama drew inspiration from a slave site as he and his family wrapped up their visit abroad.

Obama toured a seaside fortress that the British used as slave dungeons during the 17th century. Obama said the site reminded him of a recent trip to a Nazi concentration camp in Germany.

"As painful as it is, I think it helps to teach all of us that we have to do what we can to fight against the kinds of evils that sadly still exist in our world," Obama said. "Not just on this continent, but in every corner of the globe."

Obama visited the slave site with his wife, Michelle, and their daughters and Michelle's mother, Marion Robinson. They walked through the 'door of no return' during a guided tour of Cape Coast, one of the last places Africans passed through on their way to be sold into slavery in the United States.

While Obama himself is not descended of slaves, his wife Michelle is, and it's reported her family originally came from West Africa, perhaps passing through Cape Coast themselves. While Obama acknowledged the anguish suffered at Cape Coast, he chose to use his words to focus on overcoming the past.

"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 for the extraordinary progress we made because of the courage of so many blacks and whites to abolish slavery and ultimately win civil rights for all people I think is a source of hope," Obama said. "It reminds us that as bad as history can be its also possible to overcome."

The president spent time walking and talking with his children, explaining what they were seeing, including the 16 cannons that once protected the fortress and the ocean out-stretched before them that once carried slaves to the shores of America.

The girls have had quite the summer camp experience. This week alone, they met Russian President Dmitry Medvedev and went on a tour of the Kremlin, toured Rome with their mother and grandmother and finished the week here. But Obama did not want the girls to end their summer without some lessons about life.

"I think it was particularly important for Malia and Sasha who are growing up in such a blessed way to be reminded history can take very cruel turns," Obama said.

"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," he added. "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."