Nigerian President Muhammadu Buhari, left, and South Africa's President, Cyril Ramaphosa, shake hands as they meet after a welcoming ceremony in Pretoria, South Africa Thursday, Oct. 3, 2019. Buhari is visiting South Africa after a wave of attacks on foreigners angered many African countries and led to an extraordinary airlift to take hundreds of Nigerians home. (AP Photo/Themba Hadebe)

Nigerian President Muhammadu Buhari, left, and South Africa's President, Cyril Ramaphosa, shake hands as they meet after a welcoming ceremony in Pretoria, South Africa Thursday, Oct. 3, 2019. Buhari is visiting South Africa after a wave of attacks on foreigners angered many African countries and led to an extraordinary airlift to take hundreds of Nigerians home. (AP Photo/Themba Hadebe)

PRETORIA, South Africa (AP) — South Africa’s president on Thursday said “early warning mechanisms” will be put in place to avoid the kind of deadly attacks on foreigners that angered many African countries and led to an extraordinary airlift of Nigerians, while Nigeria’s visiting leader again condemned such violence as “unacceptable.”

What originally was planned as a business meeting between Africa’s two largest economies turned into talks by Nigerian President Muhammadu Buhari and South African President Cyril Ramaphosa on how to calm the unrest that has erupted regularly in South Africa in recent years.

South Africa has been making efforts to mend ties with Nigeria and others after its government faced criticism for not explicitly speaking out against xenophobia at first but instead framing the violence as crime. Ramaphosa on Thursday again stressed the need for immigrants to obey local laws but called the xenophobia “regrettable.”

ADVERTISEMENT

More than 12 people were killed and more than 700 arrested after bands of South Africans in Johannesburg and the capital, Pretoria, launched attacks against foreign-owned shops and stalls, looting and burning the small businesses and attacking some shopkeepers.

Nigeria’s foreign minister called the attacks “sickening” and the government recalled its high commissioner to South Africa. South Africa temporarily closed its diplomatic missions in Nigeria, citing concerns over staff safety. In Nigeria’s megacity Lagos, operations of South African telecommunications giant MTN were targeted in retaliatory attacks.

South Africa’s president now says his government is “totally committed” against attacks on foreign nationals. He acknowledges frustration about the country’s high unemployment and sluggish economy but has told countrymen not to take it out on foreigners.

It was not immediately clear how the “early warning mechanisms” to avoid further unrest would work between South Africa and Nigeria. Buhari said police and intelligence forces in both countries should be alert to avoid further violence.

The periodic attacks against Nigerians and citizens of other African nations include accusations by South Africans that foreigners are peddling illegal drugs or taking jobs.

The attacks on Nigerians led some in Nigeria to call for the closure of South African companies doing business in the West African powerhouse _ a move that would create instant pain for a bilateral relationship that saw more than $3.3 billion in trade in 2018.

“Relations between our two countries are very strong and we want to welcome more businesses from Nigeria to come here,” Ramaphosa said. He noted that Africa’s population should double to 2.5 billion people by 2050, calling the continent “the next great growth market.”

The violence against foreigners in South Africa is in sharp contrast to the hospitality that other African nations showed to black South Africans during their long fight against the harsh system of white minority rule known as apartheid, which ended in 1994.

“We will not forget how Nigeria spearheaded the call for political and economic sanctions against apartheid South Africa following the Sharpeville Massacre of 21 March 1960, which left many unarmed demonstrators dead,” Ramaphosa said Thursday evening. “Without Nigerian support, our freedom would have come at a much greater cost.”

___

Follow Africa news at https://twitter.com/AP_Africa