Nigeria says it will repatriate some 600 citizens from South Africa after a wave of xenophobic violence which led to tensions between the two countries.
Some will leave on two flights on Wednesday, Nigeria's Consul General in Johannesburg told the BBC.
Ten people, including two foreigners, were killed in the city last week when mobs attacked foreign-owned businesses.
The attacks started after lorry drivers staged a strike to protest against the employment of foreigners.
South Africa has become a magnet for migrants from other parts of Africa as it has one of the continent's biggest and most developed economies.
But there is also high unemployment in the country and some people feel foreigners are taking their jobs.
Nigeria's Consul General Godwin Adama said only those who were under distress as a result of the attacks would leave the country.
Meanwhile, Abike Dabiri, head of the Nigerians in Diaspora Commission, said the government would not provide financial assistance to those leaving South Africa.
Speaking to journalists in Abuja, she said the Nigerian government would continue to hold the South African authorities accountable and insist it paid compensation to its citizens.