Nigeria intensified hostility with regional rival South Africa this week, in a harsh response to a recent wave of anti-migrant violence, with Africa's most populous country asserting its leadership on the continent.
The Nigerian government summoned the South African ambassador this week after attacks against foreigners and foreign-owned businesses spread like wildfire in the country, killing seven since Sunday and leading to some 300 arrests.
South Africa said it had closed its diplomatic missions in the capital Abuja and economic centre Lagos, following reprisal attacks by demonstrators in Nigeria on its Lagos consulate and on South African companies across the country.
Telecoms giant MTN also closed its stores over security concerns, while Nigerian police stepped up security at branches of major supermarket chain Shoprite which were vandalised.
The violence that has rocked South Africa in recent days ignited furore in Nigeria's media and online, provoking a virulent government response.
President Muhammadu Buhari expressed "dissatisfaction with the treatment inflicted on his fellow citizens" while Foreign Minister Geoffrey Onyeama said Nigeria had drawn 'a red line in the sand' with the continent's other superpower.
Nigeria's vice president had been due to attend the World Economic Forum in Cape Town before the country announced it would boycott the event.
Immigrants from Nigeria as well as Somalia, Zimbabwe, Mozambique, Malawi and South Asia flock to work in South Africa, one of the continent's premier economies.
But South Africa has seen waves of xenophobic violence since 2015, with foreigners accused of taking jobs away from South Africans, against the backdrop of increasing poverty and unemployment.
Nigerians did not appear more targeted than other foreign workers in the recent outbreak of anti-migrant attacks in South Africa. No Nigerians were killed in the attacks, in which shops and properties were burnt and vandalised.
Yet the diplomatic fallout with Nigeria was swift, as relations between the two countries are fragile. For years they have rivalled for recognition as the continent's leading economy.
On Thursday, local newspapers erroneously reported Nigerian deaths while carrying images of burning townships.
Several government figures roundly condemned the violence, criticising the country's citizens for mistreating former allies in the fight against apartheid.
Moreover prominent Nigerian singers, international stars with tens of millions of Instagram and Twitter followers, have also spoken out on the issue.
Burna Boy claimed to have been a victim of racism in South Africa in 2017 and has said he would not return there.
"I will not ever go to South Africa again for any reason until the South African government wakes the fuck up," said the continental star who is also immensely popular in the African diaspora.
His compatriot, Tiwa Savage -- with eight million subscribers on Instagram -- announced she had cancelled a concert in Johannesburg in response to the attacks.
"I refuse to watch the barbaric butchering of my people in SA," she said.
Hundreds of thousands of Internet users have called for a boycott of major South African brands, and clashes with police erupted in front of Shoprite stores on Tuesday and Wednesday in several Nigerian cities.
Boycott calls 'counterproductive'
"Calls for boycotts are totally counterproductive," however said Nonso Obikili, a Nigerian economist based in Abuja. "The South African companies that are here employ Nigerians, offer their services here, so boycotting them would be as damaging for us as it is for them."
Resentment against South Africans has not caused diplomatic strains with countries other than Nigeria.
The Kenyan foreign secretary said she regretted the xenophobic violence while welcoming "the strong condemnation of these attacks by the government of South Africa", adding that her government was working closely with Pretoria.
She said she hoped "that the ethos and values of pan-Africans will prevail over narrow nationalisms, and be the bonds that glue us together as African brothers and sisters."
The Rwandan president's adviser dismissed allegations that Paul Kagame also boycotted the World Economic Forum in Cape Town, stating on Twitter that "the president could not go there for other reasons" and that "the Rwandan delegation was very important."
The Congolese diaspora minister, Emmanuel Ilunga, said his ambassador was "in constant contact with the South African police for the protection of his compatriots".
After calls on social media to shut down the South African embassy in Kinshasa, he said: "There are no Congolese victims of these acts in South Africa so far. There is no reason to protest in front of the embassy of South Africa."