South Africa temporarily closed its embassy in Nigeria following violence against South African businesses in reprisal for attacks on foreign-owned stores in Johannesburg, while Nigeria announced plans to evacuate its nationals from South Africa.
South African Foreign Affairs Minister Naledi Pandor said on Thursday the embassy was closed temporarily after threats led to fears for staff safety.
"There is Afrophobia we are sensing that exists, there is resentment and we need to address that," Pandor told Reuters news agency.
Foreign ministry spokesman Lunga Ngqengelele confirmed the diplomatic missions in the Nigerian cities of Lagos and Abuja have been closed since Wednesday.
The announcement, which signals worsening diplomatic relations between the two African countries, comes after Nigeria introduced plans to evacuate its nationals from South Africa following a wave of attacks on foreigners.
The Nigerian foreign ministry said Air Peace, a commercial airline, offered to send an aircraft on Friday to evacuate nationals willing to return "free of charge".
"The general public is hereby advised to inform their relatives in South Africa to take advantage of this laudable gesture," Nigerian foreign ministry spokesman Ferdinand Nwonye said on Wednesday.
"Interested Nigerians are therefore advised to liaise with the High Commission of Nigeria in Pretoria and the Consulate General of Nigeria in Johannesburg for further necessary arrangement."
The statement was made after Foreign Minister Geoffrey Onyeama said Nigeria would not cave to Pretoria.
"The South African government has to assume its responsibilities and protect Nigerians in South Africa and we have to hold them to account, and they have to do that as well as pay full compensation," he said.
It also came a day after Nigeria pulled out of the World Economic Forum (WEF) gathering in Cape Town, South Africa, casting a cloud over initiatives to boost intra-African trade.
Nigeria also recalled its high commissioner to South Africa, Kabiru Bala.
A presidential source told the News Agency of Nigeria that Abuja also demanded full compensation for the loss of life and property of Nigerians affected by the attacks.
Rioting in South Africa has killed at least seven people in Johannesburg and Pretoria in recent days.
Police in the country have yet to pinpoint what triggered the violence, which began on Sunday when protesters armed with makeshift weapons roamed the streets of Pretoria's business district, pelting shops with rocks and petrol bombs and running off with goods.
Authorities have made about 400 arrests, while people across the continent have protested and voiced their anger on social media.
Analysts have noted contributing factors to the latest violence include high unemployment and frustration with limited economic opportunities.
On Tuesday, Nigerians launched what appeared to be reprisals against South African businesses in several cities across the country. Police said dozens were arrested for looting and attacks on South African retail and telecoms firms.
Abuja has repeatedly condemned the reprisals, which it insisted could only hurt Nigerians working in the affected firms.
Nigerian police said on Wednesday that security had been strengthened around South African businesses.