Spain's intelligence service warned authorities about plans for a mass attempt to breach the border of Ceuta a day before more than 70,000 migrants crossed from Morocco, newly declassified documents have revealed, intensifying questions over whether one of the country's biggest border crises could have been better anticipated.

The Spanish government released 40 intelligence reports, alerts and communications covering July after Prime Minister Pedro Sánchez promised to make the material public amid mounting criticism of his government's handling of the crisis. Among them is a July 29 warning from Spain's National Intelligence Centre, or CNI, describing social-media calls for migrants to enter Ceuta the following day either by scaling the border fence or swimming around it. The timing was unusually specific: organisers were reportedly urging people to take advantage of Morocco's Throne Day celebrations on July 30, when security forces were expected to be occupied elsewhere. In a WhatsApp message to the Spanish government's delegation in Ceuta, the CNI warned that two groups promoting the attempt had a combined 180,000 followers. Spanish intelligence also passed the warning to Morocco's domestic and foreign intelligence agencies, the DGST and DGED.

The documents also suggest the warning did not emerge from nowhere. By July 25, Spanish authorities were already watching a rapidly deteriorating situation, with around 1,700 migrants having arrived by sea from Morocco and further crossings expected in the immediate future. By the night of July 29, according to a subsequent CNI assessment, large numbers of people were already gathering along the Moroccan coast waiting to enter the water. The following morning, Ceuta's president Juan Jesús Vivas publicly described the situation as an “absolute humanitarian and social emergency”. Hours later, the border was overwhelmed. More than 70,000 people ultimately entered the tiny Spanish enclave, in what became the largest migration surge in Ceuta's history.

The revelations complicate Sánchez's earlier insistence that his government had no warning capable of predicting what was about to happen. His government is now drawing a distinction between being warned that an organised crossing was being planned and knowing that the eventual influx would reach such extraordinary proportions. Foreign Minister José Manuel Albares said he had received no information pointing to an “avalanche” of that magnitude. That defence has some basis in the documents: while intelligence clearly identified the planned attempt and the enormous online audience around it, the released material does not appear to predict that more than 70,000 people would successfully cross.

An equally uncomfortable question concerns Morocco. Spain's Interior Ministry reported that Moroccan border forces had been expected to reinforce the frontier with around 1,000 additional police and soldiers, yet Spanish intelligence later described Morocco's operational response as lacking proactive action once control began to collapse. A separate Spanish police report has alleged much more serious Moroccan permissiveness, but Sánchez has said Spain has found no evidence proving that the Moroccan government orchestrated the influx. Morocco has not publicly accepted allegations that its authorities facilitated the crossing.

Six weeks later, Ceuta is still living with the consequences. NGOs estimate around 140 people died during the crossing, while local authorities say more than 10,000 migrants, including unaccompanied minors, remain in the enclave, many living in makeshift camps, streets and beaches. Residents have staged near-daily protests, and the crisis has become another flashpoint in Spain's increasingly bitter debate over immigration and the Sánchez government's relationship with Morocco.