South Africa said Thursday it had temporarily closed its diplomatic missions in Nigeria as the country came under fire for a wave of attacks on foreign-owned stores.
Seven people were killed and dozens of shops destroyed in xenophobic violence in and around Johannesburg this week, triggering angry demonstrations in several African countries.
Foreign workers are often victims of anti-immigrant sentiment in South Africa -- the continent's second biggest economy -- where they compete against locals for jobs, particularly in low-skilled industries.
African nations have appealed for calm, while urging their nationals in South Africa to exercise caution.
Nigeria, the source of many of the workers in South Africa, has stepped up security after apparent reprisal attacks, while violence also flared in the Democratic Republic of Congo on Thursday.
In Nigeria, South Africa's embassy in the capital Abuja and consulate in the economic hub of Lagos were shut on Wednesday.
"After receiving reports and threats from some of the Nigerians we decided to temporarily close while we are assessing the situation," South African foreign ministry spokesman Lunga Ngqengelele said.
Ngqengelelee told AFP the decision was made to protect employees after groups of people tried to force their way into the Lagos mission.
"We will be monitoring the situation," he said. "When we see it necessary to open, we will reopen."
South African telecoms giant MTN temporarily closed its Nigeria outlets on Wednesday after protesters attacked South African-owned firms in a number of cities.
And in another outbreak on Thursday, angry crowds in DR Congo's second largest city Lubumbashi smashed the windows of the South African consulate and looted South African-owned stores.
'Home for all'
President Cyril Ramaphosa condemned the violence, but acknowledged: "We face a huge challenge."
"Taking action against people of other countries is not right," he said. "South Africa is home for all. We are not the only country that has become home for people fleeing."
The nationality of the victims has not yet been determined.
The violence in South Africa had largely fizzled out Wednesday with only a handful of looting incidents reported by police, mainly targeting shopping centres.
A group of residents late Wednesday confronted a mob caught breaking into a local retail store in the northern township of Katlehong.
"We are happy that the law abiding members of the community are becoming frustrated about these criminals who are targeting businesses in their areas," provincial commissioner Elias Mawela said in a statement on Thursday.
More than 420 people have been arrested since Sunday.
"The only area where we still have a group that is giving us a great deal of worries in is Katlehong," David Makhura, the premier of Gauteng province which includes Johannesburg, told reporters.
In 2008, xenophobic violence left 62 people dead, while in 2015, seven were killed in attacks in Johannesburg and Durban.
The latest violence has soured ties between the continent's biggest powers, with Nigeria boycotting the World Economic Forum on Africa in Cape Town this week.
Nigeria also summoned Pretoria's ambassador on Tuesday and said it would send an envoy to convey "Nigeria's displeasure over the treatment of her citizens".
The government said the head of private Nigerian airline Air Peace Airlines had offered to fly Nigerians home for free.
AFP was not immediately able confirm this with the company.
South Africa is a major destination for economic migrants from neighbouring Lesotho, Mozambique and Zimbabwe. But others come from much farther away, including South Asia and Nigeria.
Several Nigerian-owned shops and properties have been destroyed, Foreign Minister Geoffrey Onyeama said, but said no Nigerians had been killed.
"On social media, there is a lot of stories going around of Nigerians being killed, jumping off buildings and being burnt," he told reporters on Wednesday. "This is not the case."
South African police have also condemned the "abuse of social media... since the flare-up."
'Concern us all'
Other African heads of state have also spoken out against the attacks.
"The incidents in South Africa concern us all," Senegalese President Macky Sall tweeted. "I call for peace between countries and African people."
Chad called on its citizens in South Africa to make contact with the embassy and avoid areas "where they could be targeted".
"(The ministry) asks the South African authorities to ensure the safety of all foreigners living in South Africa," it said in a statement.
The Republic of Congo also advised its citizens to exercise caution.
Nigerian billionaire Aliko Dangote -- reputedly Africa's richest man -- said violence between Africans hindered "our aspirations for a shared and sustainable prosperity".
"It is time for Africans to put Africa at the centre of its own development, by harnessing our entrepreneurial and intellectual skills."