President Muhammadu Buhari Monday ordered the immediate voluntary evacuation of Nigerians from South Africa after days of anti-foreigners attacks in the country, his media adviser Femi Adesina said.

“Buhari has also given instruction for the immediate voluntary evacuation of all Nigerians who are willing to return home,” Adesina said in a statement.

The presidential order came after Buhari received the report of the one-man envoy, Amb. Ahmed Rufai Abubakar, Director-General, National Intelligence Agency (DGNIA), sent to convey Buhari’s grievances to the South African President Cyril Ramaphosa.

The Special Envoy, according to Adesina, also reviewed the situation of foreign emigrants in general and Nigerians in particular.

“They agreed to work together to find a permanent solution to the root causes of the recurring attacks on Nigerians and their property,” Adesina added.

“Ramaphosa reaffirmed his stand against criminality and committed to do everything possible to protect the rights of every Nigerian and other foreign nationals in the country.”

A recent spate of xenophobic attacks in South Africa have left 10 dead and with over 400 arrests made, police said on Friday.

The unrest began in a Johannesburg suburb on Sunday when a protest march against drug-dealers blamed on foreigners devolved into violence, local media reported.

By Monday, rioters looted foreign-owned shops and set fire to cars and buildings in South Africa’s commercial capital and largest city.

Photos and videos showed protesters carting away food items, with a particularly striking image depicting two people making off with an entire vending machine.

In a recorded statement on Tuesday, the South African leader said the attacks must “stop immediately”.

“The people of our country want to live in harmony; whatever concerns or grievances we may have, we need to handle them in a democratic way. There can be no justification for any South African to attack people from other countries,” Ramaphosa said.

Foreigners are often blamed for taking jobs from South Africans in a country where unemployment is as high as 28 per cent.

Nigeria recalled its ambassador to South Africa Wednesday and pulled out of the World Economic Forum Africa Summit in Cape Town. It is a sign of deteriorating diplomatic and economic ties between Africa’s largest economies.

Social media was awash with messages against the violence using the hashtag #SayNoToXenophobia.

The messages did little to halt tit-for-tat violence in the real world; by Tuesday evening South African-owned businesses in Nigeria were vandalised and looted in Lagos. Branches of the supermarket Shoprite and offices of the telecom giant MTN were attacked.

On Wednesday, both businesses announced in separate statements they were closing shops out of concerns for the safety of their customers and staff.