An anti-foreigner mob of about 1,000 people rampaged across South Africa’s capital city on Friday, assaulting and looting, in the latest dangerous escalation of tensions over immigration. The march nearly turned disastrous when the mob entered a Pretoria neighbourhood dominated by Somali and Nigerian migrants. Hundreds of foreigners confronted the mob, the two sides separated by only a few metres, wielding bricks, wooden poles and other weapons. Police finally managed to disperse them with stun grenades, rubber bullets and water cannons.

Many South Africans accuse the foreign migrants of causing unemployment and crime, despite evidence that the migrants create jobs by opening businesses and employing locals. Anti-foreigner attacks, which have erupted sporadically into deadly violence since 2008, have remained frequent in South Africa this year at a time of economic stagnation, high unemployment and rising crime. The attacks on foreign migrants – largely Nigerians, Zimbabweans and Congolese – have caused a growing rift between South Africa and other African countries. The Nigerian government has protested the attacks this week, calling on the African Union to “intervene urgently” to prevent more bloodshed. The violence has sparking retaliatory attacks in the Nigerian capital, Abuja, where one group of protesters on Thursday ransacked a shop owned by MTN, a South African cellphone company. After protesting the anti-foreigner violence in South Africa, they broke into the shop and stole cellphones and laptops. Police were deployed to guard the shop.

South Africa has suffered anti-foreigner violence in the past, mostly notably in 2008 and 2015 when dozens of foreigners were killed by mobs. Attacks have erupted again in Johannesburg and Pretoria over the past week, on the pretext of targeting drug-dealers and brothels. Dozens of foreigners saw their homes ransacked, robbed or destroyed in arson attacks. In one case, a mob invaded a Nigerian church, assaulting the Nigerian pastor and his congregation and leaving them with bloody injuries.

At the same time, another group announced the formation of an anti-foreigner political party, South African First, which vowed to force all foreigners to leave South Africa within 48 hours of winning power. The violence in Pretoria on Friday began when an anti-foreigner group – supported by the new political party – obtained permission to march to government offices. The group carried an official memorandum blaming foreigners for a long list of problems: everything from illegal taxis and untidy churches to unfair hair-salon competition. It even demanded a government program to teach foreigners to speak more politely. “They are arrogant and they don’t know how to talk to people,” the memorandum concluded. At least one person in the anti-foreigner march carried a placard asking U.S. President Donald Trump for support. “Donald come and save us,” the sign read. “Foreigners must go,” the mob sang after one assault. “We will kill them. They are destroying South Africa.” they said.

South African President Jacob Zuma seemed to be supporting the marchers, saying that the organizers were merely protesting against crime. “It was not an anti-foreigners march,” he said on Friday, disregarding all of the evidence. Amnesty International said the South African government has fuelled the anti-foreigner attacks since 2008 by failing to arrest the perpetrators and tolerating a “toxic populist rhetoric that blames and scapegoats refugees and migrants.” The Nelson Mandela Foundation, a charity created by the late president and anti-apartheid hero, said it was shocked that the authorities had given permission for a “march of hatred” in Pretoria on Friday. The Nigerian embassy in South Africa set up a hotline where Nigerians could report attacks on foreigners. The Nigerian government advised its citizens in South Africa to be vigilant, and it urged South Africa “to bring perpetrators of these deplorable acts of violence to justice.”