Zambia's university students burn the sign outside the South African Embassy in Lusaka on September 4, 2019 during a demonstration to protest against xenophobic attacks on foreign nationals in the Rainbow Nation. (Photo by SALIM DAWOOD / AFP)
CNN  — 

South Africa has temporarily closed its diplomatic missions in Lagos and Abuja, Nigeria, fearing reprisal attacks against its citizens, an official told CNN.

The closures follow outbreaks of violence earlier this week in South Africa. At least five people were killed and 189 arrested during xenophobic attacks and looting in Johannesburg, Pretoria and elsewhere.

Much of the violence targeted migrants from other African countries and foreign-owned businesses. The attacks prompted retaliatory looting in Nigeria, with South African-owned brands being targeted in looting at stores.

Government spokesperson Lunga Ngqengelele said officials in South Africa were currently assessing the threat and did not yet know when the diplomatic missions would reopen. The Nigerian arm of MTN, Africa’s largest telecom company, closed all its stores until further notice after some of its outlets were targeted, the company said.

The fallout from the outbreak of looting and violence that began on Sunday has been swift. Foreign nationals from countries including Zambia, Kenya, Ethiopia and Nigeria were targeted.

Since then Nigeria has pulled out of the World Economic Forum conference happening this week in Cape Town and plans to recall its ambassador, the country’s foreign minister said Wednesday.

Zambia has refused to play in a friendly football match against South Africa because of the violence. The two former African champions were set to meet in the Zambian capital, Lusaka Saturday, but the Football Association of Zambia has called off the match.

Nigerian pop star Tiwa Savage canceled an upcoming concert in South Africa.

One Nigerian company told CNN it has canceled plans for their annual employee holiday to the country, forfeiting nearly $30,000 in flights, accommodation and visa fees.

Instead, the company is offering free flights back home for Nigerians who want to leave South Africa.

Olawale Ayilara, CEO of Landwey Investments, a real estate company in Lagos, Nigeria’s economic capital said: “Everyone in our company goes on leave at the same time and we take an international trip together. This year, we were going to South Africa and were supposed to leave (Friday).

“We canceled because we decided we couldn’t go after hearing of all the problems there. We also decided to use funds to help people who would like to come back home from South Africa.

A protestor gestures and holds a placard during a demonstration in front of the South African Embassy in Lusaka, Zambia on September 4, 2019

“We want people to know that if they have anybody who wants to come back, they can let us know and we will help them to come back.” he said.

The offer comes as Nigeria’s foreign ministry also announced that a local airline, Air Peace, has offered free flights to Nigerians who want to return from South Africa.

Nigerians living in South Africa have taken them up on the offer, Ayilara said and the first set of people will arrive in the country Friday after purchasing tickets for them on Air Rwanda.

“South African airline was cheaper but we are not interested in South African airlines for now,” he said.

South African President Cyril Ramaphosa warned Tuesday that the spate of attacks could trigger violence against its citizens abroad.

“The attacks on people who run businesses from foreign nationals is totally unacceptable,” Ramaphosa said.

“There can be no justification whatsoever about what people are having a grievance over that they should go out and attack people from other countries because when they do so here, they should also know that fellow South Africans will be attacked in other countries,” the President said.

Xenophobic and anti-immigrant attacks are not new in South Africa.

Demonstrators forced hundreds of foreigners from their homes and looted some businesses in Durban in April.

They claimed that foreigners had taken jobs that should have been filled by locals.

In 2017, violent anti-immigrant protests broke out in the capital Pretoria and in 2015, several people were killed, and thousands fled after xenophobic attacks across the country.