Spanish intelligence services warned of social media calls for a mass migrant crossing into Ceuta the day before tens of thousands of people entered the territory, newly released government documents show.

On 29 July, Spain’s National Intelligence Service (CNI) told Moroccan and Ceuta authorities that WhatsApp and Facebook groups were encouraging migrants to cross the following day.

The messages, sent via text to the central government’s representation in Ceuta and the civil guard, warned that about 180,000 people were receiving the messages. One of the messages read: ‘Whoever wants to cross has the last chance on Throne Day 30 July at 8 – the authorities will be distracted with the celebrations and parades.’

Despite the warning, at least 72,000 migrants crossed from Morocco into Ceuta on 30 and 31 July. Most swam around a border fence and at least 100 people died during the crossing, according to figures from Ceuta’s mayor.

Many returned, but as many as 5,000 remain in makeshift camps or are sleeping on the city’s streets and beaches, leading to unrest in the autonomous Spanish city on the African coast. Local residents have expressed safety concerns and some have destroyed shelters and blocked aid to the migrants.

Prime Minister Pedro Sánchez insisted the events were impossible to predict, but opposition parties say the documents show that the government had the information and failed to act. José Manuel Albares, the foreign minister, said he was unaware of any report that might have foreseen the magnitude of what happened on July 30.

A government source said the published documents showed that the information available before the mass crossing did not make it possible to anticipate the scale of the crisis or prepare the necessary response with enough time.

Against the backdrop of these revelations, the Central Government’s delegate in Ceuta, Miguel Ángel Pérez Triano, said the WhatsApp messages from July 29 did not constitute an alert but simply exchanged information.