Images of bombed villages, piles of dead bodies — the photos in the exhibition at the Nelson Mandela Centre of Memory in Johannesburg are raw and often emotional.

Called "On the Frontline," the exhibit pays tribute to South Africa's neighboring countries that helped it get rid of apartheid two decades ago and paid a high price in doing so.

The exhibition opened just weeks after a wave of attacks targeting foreigners, the majority from nearby countries like Zimbabwe and Mozambique.

The timing couldn't be more appropriate, and yet it's just a coincidence, said professor Njabulo Ndebele, chairman of the Nelson Mandela Foundation. The exhibition was planned more than a year ago as signs of xenophobia were already present.

"The eruption of violence came as no surprise to many people who have carefully looked at the situation unfolding over the years," Ndebele said. "So then even if the exhibition was planned a year ago, it also speaks to the sense of foresight."

Keynote speaker Graça Machel, a Mozambican citizen, human rights activist and widow of Nelson Mandela, recalled the days of struggle from the whole of southern Africa to free South Africa from its racist apartheid regime. She said the rise of xenophobia in South Africa is deeply linked to the poverty and frustration many of its people suffer from that makes them forget the solidarity of the past.

"The problem is, the dream has failed the millions," she said. "And that's why it is the millions down there who are burning each other, who are killing each other. ... You are the front line to reinvent the dream, and you are the front line to mobilize our people to show that these borders which we inherited have no significance at all."