The Star News

Manipulated Algorithms, Social Media and How They Exacerbate the Xenophobia Crisis in South Africa

Dr A.D. Essome|Published
Clashes outside Durban’s Diakonia Centre as the ANC in KwaZulu-Natal called on the security cluster to strictly enforce existing laws, with the party taking a hard line against rising vigilantism and slamming populist leaders for stoking xenophobic tensions. As South Africa faces a rising tide of xenophobia, the absence of African ambassadors on Africa Day highlights the urgent need to examine how social media algorithms amplify societal tensions.

Clashes outside Durban’s Diakonia Centre as the ANC in KwaZulu-Natal called on the security cluster to strictly enforce existing laws, with the party taking a hard line against rising vigilantism and slamming populist leaders for stoking xenophobic tensions. As South Africa faces a rising tide of xenophobia, the absence of African ambassadors on Africa Day highlights the urgent need to examine how social media algorithms amplify societal tensions.

Image: Doctor Ngcobo / Independent Newspapers

Few days after Africa Day fell silent in the shadow of boycotts and repatriations, South Africa is confronting an uncomfortable truth about the crisis unfolding within its own borders.  On 25 May, the day the African continent traditionally gathers to affirm its unity, African ambassadors refused to attend South Africa's official celebrations. They did not feel safe. Nigeria and Ghana had already begun repatriating their citizens.

According to reports, at least seven people were dead. The movements behind the violence, March and March and Operation Dudula, had swept through Johannesburg, Pretoria, and Durban, leaving fractured communities, destroyed businesses, and formal diplomatic complaints from Nigeria, Ghana, and Mozambique in their wake. A United Nations warning had drawn international headlines. A country that presents itself as the gateway to Africa was being watched with alarm by the very neighbours it claims to lead.

Why now, and why with such intensity? Although not the only response, the answer lies at the intersection of deep economic frustration, deliberate political orchestration, and a digital ecosystem built to reward outrage over reason. South Africa's own 2022 census shows that migrants make up just 3.9% of the total population, roughly 2.4 million people in a nation of 62 million. The country is not being overrun. It is, however, in acute economic pain. And pain, in the age of social media, travels fast, particularly when algorithms are specifically engineered to move it faster and to the largest possible audience.

Legitimate Grievances, Distorted by Design 

The Centre of Artificial Intelligence for Sustainable Development www.CAISD.co.za, one of the many centres in the continent working to harness the role of technology to achieve development, wanted to pinpoint the role technology plays in exacerbating the antipathy without dismissing the frustrations of South African nationals.

To do so would be dishonest and counterproductive. The official unemployment rate stood at 32.7% in the first quarter of 2026, with more than 8.1 million people without work and youth unemployment reaching a staggering 57%. These are lived realities in communities that have spent three decades waiting for the economic transformation promised by democracy.

Against this backdrop, the visible economic presence of foreign nationals creates friction that is psychologically real, even where it is statistically misread. Statistics South Africa data shows that foreign nationals carry an employment absorption rate of 64%, compared to 37.7% for South African-born workers, and in some townships, they own up to 40% of informal businesses.

A 2025 Human Sciences Research Council survey found that 42% of South Africans would "welcome no immigrants," while 77% agreed that immigrants increase crime. The crime link is not supported by evidence, but these numbers reveal something equally significant: a large portion of the population has already been persuaded by a narrative. The critical question is who built that narrative, and how was it distributed so effectively? 

 

The Algorithm: Not the Cause, but the Accelerant

The social media platforms most South Africans use daily, including Facebook, TikTok, X, WhatsApp and YouTube, are not neutral infrastructure. They are built around a single commercial objective: sustained engagement. Decades of research, including internal studies from Meta, show consistently that the content most likely to sustain engagement is content that provokes anger. 

Anger travels. A video of a foreign national behaving badly, stripped of context, spreads further and faster than any evidence-based article about what immigrants contribute to the economy. In the lead-up to the 2026 protests, populist leaders and influencers circulated incendiary content without context. Those videos were algorithmically rewarded with reach, shared into WhatsApp groups where factchecking is practically impossible, and broadcast live on platforms that amplified these movements before any journalist had assessed whether their claims were truthful.

Research on South African electoral cycles reveals a consistent and troubling correlation: xenophobic discourse spikes reliably in the approach to local elections, in 2016, 2019, 2020, and now 2026, with local government elections scheduled between November 2026 and January 2027. Xenowatch data confirms the trajectory, with recorded incidents rising from 58 in 2020 to a peak of 110 in 2022, before climbing again to 83 in 2024. The algorithm does not cause xenophobia. But it is extraordinarily effective at timing it, scaling it, and normalising it.

The Dark Labs: Organised Narrative Operations

Beyond algorithmic mechanics lies something more deliberate. There is growing evidence of what we at CAISD terms "coordinated narrative architecture": the strategic seeding of divisive content by small, well-resourced operations, some functioning entirely outside South Africa. These are not spontaneous expressions of public anger. They are manufactured interventions, exploiting the fact that, if enough accounts share the same message within a narrow window, platforms will push it to audiences who were never searching for it.

This is a documented feature of contemporary information warfare, evidenced in Brexit, in the United States during the 2016 election cycle, and increasingly in African political contexts. When mainstream media then covers these movements without adequately challenging their claims, including the demonstrably false assertion that some youths purported to be undocumented migrants are not entitled to public healthcare and education under South African law, it lends those claims a credibility they do not deserve.

Evidence, Policy, and the Way Forward 

The World Bank's studies of South African labour markets have found that immigrants are net contributors to job creation. Foreign-owned enterprises sustain supply chains that employ South Africans. South Africa's chronically low GDP growth of between 0.6 and 1.3% annually is a structural problem rooted in energy infrastructure failure, skills deficits, investor uncertainty, and governance weaknesses that predate every foreign-owned spaza shop in the country. Deporting 2.4 million people will not build a single power station, train one additional nurse, or resolve the Eskom crisis.

The government has a legitimate mandate to enforce immigration law, process permits efficiently and protect South African workers. What is far more troubling is when the tone of official policy pronouncements begins to track the mood of protests rather than the weight of evidence. That convergence, historically, is where crises cross thresholds they cannot easily come back from.

CAISD's call is therefore clear. Social media platforms must be held accountable for algorithmic amplification of xenophobic content, including through multilingual content moderation. Digital literacy must become a civic priority. Counter-narratives must be deployed as strategically as the narratives they counter, because facts alone do not go viral, but stories do. And African governments and civil society must speak with one continental voice, because the diplomatic rupture South Africa is experiencing today is a warning of what silence costs the entire continent. The algorithm did not start this fire. But it is fanning it, and it will keep doing so until platforms are held accountable, communities are equipped to resist manipulation, and policymakers choose evidence over the applause of the crowd. 

* The Centre for Artificial Intelligence and Sustainable Development (CAISD) is a pan-African non-profit think tank operating at the intersection of artificial intelligence, policy, and sustainable development. CAISD is committed to peaceful cohabitation across the African continent as a foundational condition for achieving the Sustainable Development Goals. Dr AD Essome is its Co-chair and former United Nations Communications Specialist who extensively wrote on how “Legacy Media and Social Media platforms can promote conflicts resolution within the continent”

** The views expressed do not necessarily reflect the views of IOL or Independent Media.