Spain’s intelligence services detected, as the declassified documents revealed, the Ceuta surge before it happened. The Centro Nacional de Inteligencia also recognized, despite the Prime Minister’s claim to the contrary in his statement to the Congress of Deputies, that dispersed attempts to cross the border could arise quickly and become unmanageable. The institutional failure was, therefore, was not so much about recognizing the risk, but rather the absence of a decisive institutional act in the same digital environment where the risk was reproducing and dangerously scaling.
What Termites Reveal About Coordinated Action
A scientific account of how sporadic individual actions can turn into self-coordinated mass behavior comes, unexpectedly, from a 1959 entomology study. Pierre-Paul Grassé watched termite workers rebuild a nest after he placed them in an artificial environment. For the first few minutes: chaos. Workers glued pellets of earth wherever they happened to stand, abandoned half-built pillars, wandered off, groomed each other, and started again somewhere else.
Grassé described this initial period as the ‘incoordination phase’, during which the workers’ activity appeared largely random. Over time, due to its cumulative nature, he observed that rules guiding a shared pattern started emerging. Workers began building toward the same structure, in the same direction. Grassé named the mechanism stigmergy: coordination that emerges when changes made by one agent in a shared environment shape the behaviour of others. In this case, each pellet placed in the environment became a stimulus that shaped what the same and next worker did, so the structure itself, not any individual termite, ended up directing the work.
In a security context, Professor Tony White’s report for Canada’s Department of National Defence highlights how stigmergic algorithms can help authorities manage decentralized control problems without relying on centralized command. Dr. Rodrigo Nieto-Gómez, from the Institute for Regional and International Security, discusses how stigmergic coordination plays out at the US-Mexico border by becoming a persistent geopolitical ‘attractor’ forcing both government and criminal agents to innovate.
The Threshold Between Apathy and Contagion
Grassé also searched for the answer to a question Spanish authorities have not yet considered in their contingency planning. How many workers does it take before that shift from randomness to self-coordination happens? In his experiments, Grassé observed that small groups started slowly and abandoned the effort before completing anything coherent.
Grassé found that the incapacity to build was due to insufficient social stimulation. Below a certain threshold, the insects grew apathetic, working in short discontinuous bursts with long gaps between them. Above this threshold, he observed that the more workers were active, the more new workers joined. Each additional participant makes participation easier for the same and next agent. He defined this as the ‘contagion of work’.
The insight is that stigmergic systems are driven by accumulated traces approaching a threshold, not by averages. A mean of 37 swimming entries a day between July 10 and 25, according to the Prime Minister’s account, says little about how close the system sits to its tipping point. Each added participant raises the pull on the next, and some factors determining how strong that pull becomes are (i) the acceleration of the trend, (ii) the emotional or informational charge of a shared trace and (iii) the clout of the social media user who posts or reproduces it. Any of these can, in a single message (the metamark) push the system past the threshold or even set the threshold itself, turning random digital traces into self-coordinated mass movements.
How Ceuta Crossed the Line
It could be argued that one of the triggers for the virality of social media posts in the Ceuta crossings was a legal one. A Supreme Court ruling, dated June 29 and made public on July 8, held that Spain could not use immediate border rejections against migrants intercepted at sea because swimming did not breach a physical containment element like the land fence.
On social media, this ruling was distorted into rumors that the border was open and that anyone who arrived swimming could not be returned. Notably, these rumors circulated with barely any impact until July 28.
Digital traces can be found and replicated across time because such messages exist in a shared digital environment, where they can be copied at scale at any moment. That replication can lead large numbers of unknown individuals to self-coordinate in response to the same stimulus. This is a core assumption of Stigmergy Network Theory, which I investigate through metamarks in my research on human stigmergy.
In late June and early July, irregular crossing attempts into Ceuta stayed in the single digits and low double digits most days, exactly the discontinuous, low-energy pattern Grassé described in his experiments. However, as more people started attempting to cross the border in late July, intelligence officers recognized the emerging risk, stating it in official notes.
The warnings, however, were ambiguous. On July 29, for instance, border officials warned of an extreme risk of irregular crossings. Yet the same document, while acknowledging the role of social media in fueling these coordinated attempts, stated that it could not be assured that such illegal crossings would materialize.
According to a post on X by the Prime Minister, Spain’s National Intelligence Centre sent a warning to Ceuta’s Government Delegation on July 29 about a social media call to cross the border by land and sea the following day, which coincided with Morocco’s Throne Day. Spanish border officials reported that the organisers believed the holiday would keep border authorities occupied. And according to the Prime Minister in the same post, that warning note never reached the highest level of the chain of command.
That mechanism behind the emerging risk is the one Grassé had already observed. He noticed that apathy is not a fixed condition but a function of how many agents are exposed to a stimulus. In Ceuta, the number of people attempting to cross the border was increasing rapidly.
One Facebook group with approximately 160,000 followers and a WhatsApp channel specifically created to excite users to the border crossing were adding many interactions. Each new post functioned the way each new pellet worked in Grassé’s dish, a reinforcement trace that made the next act easier and more attractive for whoever encountered it and was predisposed to react to it, as that is also how recommendation algorithms are designed. Recommendation algorithms may have amplified this process by increasing the visibility of related content, although that mechanism requires evidence specific to the platforms and events in question.
Once that online density crossed a threshold (the metamark), the contagion of work took over. Guardia Civil figures show a sharp increase in reported swimming-crossing attempts: 77 on July 23, 91 on July 24, 162 on July 25, 194 on July 26, 242 on July 27, 245 on July 28, and 468 on July 29. . That is apathy giving way to contagion.
On the morning of July 30, according to the Prime Minister’s address, groups of young people began walking and driving toward Ceuta from nearby towns. They arrived at the border and, shortly after they began crossing the Tarajal breakwater. For roughly ten hours, Moroccan gendarmes let people through. Spanish agents, facing a choice between containing the crowd by force and protecting lives, chose to let people pass. By nightfall, over 70,000 people had entered. The Prime Minister reported that 141 migrants died on July 30 and 31.
Not Everyone Moves the Same Way
One detail in Grassé’s foundational work deserves more attention than it usually gets because it challenges the assumption observed in most news coverage of the Ceuta crossing. Even in the largest and most coordinated groups, Grassé found that not all agents in a colony behave the same way. A quarter to half of the termite workers never joined the construction at all.
He went on to explain this gap by observing that termite workers were simply less sensitive to what he called ‘peripheral stimulation’, the pull exerted by activity happening nearby. The larger the group, the stronger that pull became for the workers responding to it, but it remained a smaller proportion of the entire population.
Ceuta shows a similar pattern. Swimming, the usual focus of news stories and images, accounts for only part of the total number of illegal entries. Although the Spanish government has declassified documents on swimming crossings, it has not published a breakdown of crossing methods for July 30 and 31, the peak days. The government has stated that producing such a breakdown requires a ‘specific analysis’.
A surge does not mean that everyone responds to the same stimulus in the same way. Treating those drawn towards the border as a single, undifferentiated mass obscures differences in motivation, exposure to information, and willingness to participate. It may also lead authorities to misunderstand the dynamics of a crowd and the demands those dynamics place on their response capacity.
The Answer That Never Came
Spanish authorities had access to the exact groups generating and stimulating the contagion. They named, counted, and quoted them in their files. However, unlike the British police who acted decisively on social media to refute rumors during the August 2011 riots, Spanish officials did not enter those critical digital spaces with information of their own.
A conventional risk-management approach of placing more patrol boats at the border cannot interrupt a contagion of work happening on a phone screen. Authorities may also need to communicate timely, clear, and authoritative information through the channels in which rumours and calls to action are circulating. To be effective, such messages must reach the relevant audiences and respond directly to the claims driving mobilisation.
Timing sharpens the point. The rumors about the court ruling began circulating on July 8, while calls to mobilize became massive only on July 29. To a certain extent, then, the Prime Minister is right when he says that the number of irregular crossings through July 29 did not show a pattern of exponential growth that could have anticipated what happened. However, in the same address, he also claimed that there was no linear growth either, but the figures in the declassified documents disprove him. Yet, the main issue is not the inaccuracy of this analysis but the fact that, between the first rumors and the peak days, there were roughly three weeks in which the authorities could have corrected them before the contagion overwhelmed their capacity to contain it.
Spanish authorities had the chance to mitigate those risks, but they failed to act decisively in the same digital environment they had identified as scaling toward that critical mass. Nor could they claim to have been caught off guard by something unprecedented. Ceuta had faced a comparable surge in May 2021, when roughly 10,000 people entered within two days. That earlier episode should have informed contingency planning, although the authorities would also have needed to account for differences between the two events.
A growing number of potential migrants were responding forcefully to what the social media metamarks were stimulating. The Spanish authorities could have used those same channels to provide timely, authoritative information, but the available evidence suggests that they did not mount a comparable response.