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.
More violence on Sunday
On Sunday, two people were killed as violence erupted in Johannesburg after a speech by Mangosuthu Buthelezi, a former leader of the opposition Inkatha Freedom Party and minister in the country's unity government after the end of apartheid.
Mr Buthelezi, who was trying to quell tensions over xenophobia, was heckled by a rowdy section of the crowd who later clashed with security forces. Video shared on Twitter showed people walking out of the meeting.
The meeting looks like it won’t be a success as people say Prince Mangosuthu Buthelezi is not addressing their issues.— Siyabonga Motha (@SiyabongaMotha_) September 8, 2019
They walked out of the meeting @voices_local @voices_local pic.twitter.com/0w8WQ0Sod4
People then targeted cars and buildings, which were set alight, Johannesburg Metro Police Department chief David Tembe told Eyewitness News, saying it was "pure criminality" as some of the shops attacked belonged to South Africans.
Earlier, dozens of men carrying clubs marched in the city singing "foreigners must go back to where they came from", Soweten Live reported. The crowd headed to Jules Park in Johannesburg where Mr Buthelezi was due to make his address.
Protesters from various hostels in eastern Johannesburg have begun marching along Jules Street. Carrying weapons, including knobkerries, the men sang, "foreigners must go back to where they came from". pic.twitter.com/SKbWqGePdz
— Sowetan LIVE (@SowetanLIVE) September 8, 2019
President Cyril Ramaphosa condemned the violence, saying the authorities would "not allow sporadic lawlessness and violence to disrupt the safety and livelihoods of millions of South Africans".
He added that "the majority of foreign nationals in our country... are law-abiding and have the right to conduct their lives and businesses in peace".
Nigerian President Muhammadu Buhari sent an envoy to South Africa last week to "express Nigeria's displeasure over the treatment of her citizens".
In a statement, the president's office said the envoy had "stressed the need for [the] South African government to take visible measures to stop violence against citizens of brotherly African nations".
President Ramaphosa "agreed that the violence was most disconcerting and embarrassing," the statement added.
Last week, police said that they had arrested more than 420 people and the unrest had subsided. The authorities made another 16 arrests after Sunday's trouble, according to a statement from the president.
As the week progressed, people across the continent shared videos on WhatsApp which purported to show violent attacks on Nigerians. But these were denounced as being misleading.