Nigeria said it has completed the evacuation of its citizens from South Africa this week, airlifting nearly 1,500 people as anti-immigrant groups piled on pressure on undocumented foreigners to leave the country.

Foreign nationals from several African countries including Ghana, Malawi, Mozambique, Uganda and Zimbabwe, have been leaving South Africa for weeks under government-assisted repatriation programmes.

South Africa, long a destination for documented and undocumented African workers, has been rocked by weeks of protests and unrest targeting immigrants, who stand accused of taking jobs and resources.

“It has ended,” Nigeria’s foreign ministry spokesman Kimiebi Ebienfa told AFP on Friday after airlifting of 1,490 Nigerians between June 10 and July 15.

The departures began after fringe South African groups ramped up demands for undocumented migrants to leave by June 30, sparking violent protests and clashes that killed at least four foreign nationals.