South Africa's president has apologized to the neighboring country of Mozambique for a spate of attacks on foreigners in his country.

Last month, a Mozambican immigrant was one of seven people killed in violence targeting immigrants living in South Africa.

President Jacob Zuma said he was apologizing on behalf of a minority of South Africans who committed the "atrocious acts." He said the South African government was working hard to ensure that similar attacks would not take place.

Zuma was speaking at a banquet held by Mozambican President Filipe Nyusi on Wednesday, as part of a two-day state visit.

More than 2,000 Mozambicans returned home following the violence, according to Mozambican authorities. More than 400 Mozambicans living in South Africa were also deported after they were arrested in police raids.