Tensions eased between twin African powerhouses South Africa and Nigeria on Thursday after Pretoria temporarily closed its diplomatic missions in the rival state following a wave of attacks on foreign-owned stores there that claimed 10 lives.
"Nigeria does not seek an escalation of the ongoing situation," a senior aide to Nigeria's President Muhammadu Buhari told reporters on condition of anonymity.
"We will work with South Africa to find solutions to their problems which have become our own problem. We will work as brothers," the aide said.
South African President Cyril Ramaphosa said earlier Thursday that at least 10 people were killed including one foreign national, while dozens of shops were destroyed in xenophobic violence in and around Johannesburg this week, triggering angry demonstrations in several African countries.
Foreign workers often face anti-immigrant sentiment in South Africa, where they compete against locals for jobs, particularly in low-skilled industries.
"No amount of anger and frustration and grievance can justify such acts of wanton destruction and criminality," Ramaphosa said.
"Equally, there is no justification for the looting and destruction of businesses owned by South Africans," he said.
Other African nations have appealed for calm, 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.
South Africa's foreign ministry called the decision a "precautionary measure".
South African telecoms giant MTN temporarily closed its Nigeria outlets on Wednesday after protesters attacked South African-owned firms in several 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'
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."
The nationality of the victims has yet to be determined.
A group of residents late Wednesday confronted a mob caught breaking into a local retail store in the northern township of Katlehong.
The unrest continued on Thursday as police clashed with protesters in the area, firing rubber bullets and stun grenades to disperse the crowd.
David Makhura, the premier of Gauteng province which includes Johannesburg, told reporters that Katlehong was the only area still "giving us a great deal of worries".
Ramaphosa said 423 people have been arrested since the weekend.
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, while adding that 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 flareup."
'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 hinders "our aspirations for a shared and sustainable prosperity".