The department said that while there had been "no direct physical threat" to any diplomats or staff, the situation remained "somewhat unpredictable" and there were sufficient safety concerns to close the offices in Lagos and Abuja on Tuesday.
On Sunday, violent mobs began looting and setting fire to foreign-owned businesses in several areas of Johannesburg and the South African capitol Pretoria. At least 10 people died, including two foreigners, scores of shops have been looted and burned, and more than 400 people have been arrested in connection with the violence since Sunday.
South Africa's president Cyril Ramaphosa condemned the attacks. "Over the past few days, our country has been deeply traumatized by acts of violence and criminality directed against foreign nationals and our own citizens," he said in a video statement on Thursday. "There can be no excuse for the attacks on the homes and businesses of foreign nationals, just as there can be no excuse for xenophobia or any other form of intolerance."
Outbreaks of violence against Nigerians and citizens of other African nations have regularly erupted in South Africa in recent years, with some South Africans accusing foreigners of peddling illegal drugs or taking jobs when the official unemployment figure stands at nearly 30%.
The latest wave incensed Nigerian citizens and officials alike, with Nigeria's Minister of Foreign Affairs Geoffrey Onyeama calling the latest attacks "sickening." Nigeria subsequently recalled its High Commissioner to South Africa and boycotted a meeting of the World Economic Forum on Africa that is underway in Cape Town this week.
Nigerian airline Air Peace also offered to fly Nigerians wanting to leave South Africa back home, free of charge, on Friday. South-African owned businesses in Nigeria have faced a wave of retaliatory violence, with branches of South African telecommunications giant MTN and supermarket chain Shoprite attacked and looted in several Nigerian cities.
Nigerian police say security measures have been stepped up for foreign missions, foreigners and their businesses across Nigeria. South Africa's International Relations and Cooperation Minister Naledi Pandor said on Thursday that Nigeria needs to address the fact that some Nigerians are, in fact, involved in criminal activities in South Africa.
"Ensuring such kind persons don't come to our country would be of great assistance to our nation," Pandor told local news station eNCA.
Olukoya reported from Lagos, Nigeria. Mogomotsi Magome in Johannesburg contributed to this report.