Johannesburg – More than 160,000 foreign nationals left South Africa over the past two months as local groups stepped up violent hostility against undocumented migrants, according to a tally based on figures from the repatriating governments.

The country has seen weeks of nationwide protests, several degenerating into violence that has claimed the lives of at least four migrants, although some foreign governments say the toll is higher.

As xenophobic groups pressed their demand for undocumented migrants to leave by June 30, citizens of other African countries flocked to consulates and community halls seeking transport home, many with only what they could carry and fearing for their lives.