WASHINGTON (AP) — President Barack Obama says slavery is a terrible part of the United States’ history and should be taught in a way that connects that past cruelty to current events, such as the genocide in Darfur.

During an interview with CNN while traveling in Ghana, Obama compared the legacy of slavery to the history of the Holocaust. He said both are horrible historical points that cannot be ignored and that their lessons must not be forgotten.

“I think it’s important that the way we think about it and the way it’s taught is not one in which there’s simply a victim and a victimizer. And that’s the end of the story,” Obama said at Cape Coast Castle, a West African site where traders once shipped slaves to the New World.

Obama, his wife, Michelle, and their daughters visited the slave trading post on Saturday at the end of a trip that took them to Russia, Italy and Ghana. It was the first trip to sub-Saharan Africa for America’s first black president.

“I think the way it has to be thought about, the reason it’s relevant, is because whether it’s what’s happening in Darfur or what’s happening in the Congo or what’s happening in too many places around the world, you know, the capacity for cruelty still exists,” Obama said.

Obama was interviewed Saturday for CNN’s “Anderson Cooper: 360.” A brief excerpt was released Sunday.