African countries including Kenya, Malawi, Lesotho and Zimbabwe have urged their citizens in South Africa to stay cautious and remain indoors amid attacks targeting foreigners, while Ghana has called on the African Union to intervene.

South Africa has been gripped by a wave of protests against illegal immigration, with tensions spilling into violence against migrants from other sub-Saharan African nations in the continent’s largest economy.

Migrant rights groups say foreigners are being scapegoated by South Africans who blame them for the country’s economic problems, particularly unemployment, which stands at more than 30% and disproportionately affects the Black population.

Ghana said Wednesday it had facilitated the safe return of a citizen who was targeted in a video that went viral, while Nigeria said it was repatriating at least 130 citizens following the deaths of two Nigerians.

Ghana’s statement did not identify the incident it was referring to, but one video circulating on social media showed a Ghanaian man being harassed by a crowd demanding to see his documents before questioning their authenticity.