Thousands of migrants have rushed across the border from Morocco into the Spanish enclave of Ceuta in a startling move that was relayed on social media and triggered a political row about migration into Europe.

One security official declared the border checkpoint had “totally collapsed” under pressure from the crowd, as young men spread instructions on social media on how to enter the Spanish territory on the northern coast of Africa.

Some migrants swam from Moroccan territory to reach the Spanish enclave, while others walked around a breakwater and crossed the rocks in numbers that overwhelmed authorities.

The political impact reached far beyond Spain because of the debate across Europe about migration, with British right-wing leader Nigel Farage sharing the dramatic videos online.

“It’s time to wake up everybody,” Farage declared.

Spanish Prime Minister Pedro Sanchez promised an “immediate response” to the situation, as his critics blamed his migration laws for encouraging people to seek asylum in Spain and gain work rights in the European Union.

“We are mobilising all necessary resources, working with Moroccan and international authorities, and preparing the necessary measures to restore normalcy as soon as possible,” Sanchez said.

Spain’s government later said it would send the military to help the Civil Guard “to maintain security in the city of Ceuta”.

Spanish newspaper El Pais reported that Civil Guard officers had to open the gates because they needed to prevent a bottleneck forming at the checkpoint.

The rush follows a Supreme Court decision in Spain last month that protects migrants who are intercepted at sea while seeking to get to Ceuta, preventing them from being immediately returned to Morocco.

That ruling is being blamed by some politicians for giving Moroccans an incentive to swim to Ceuta, a distance of about 2 kilometres across the water, or walk around the breakwater.

Another source of debate is the Sanchez government’s decision this year to grant an amnesty to migrants who were already in the country, leading to more than 1.3 million people applying to stay permanently.

Ceuta, located roughly opposite Gibraltar in the western Mediterranean, has been a Spanish territory since 1580 and now has the status of an autonomous city of Spain, although it is surrounded by Moroccan territory.

Rachid Sbihi, the head of the association that represents the Spanish Civil Guard officers in Ceuta, called for a national emergency to be declared in Madrid to stop the mass movement because the border had totally collapsed.

“The situation is absolute chaos,” he said. “It’s not possible to give precise numbers, but there are thousands of migrants crossing.”

The Ministry of the Interior in Madrid has pushed back at the idea of a national emergency being declared.

Interior Minister Fernando Grande-Marlaska is due to travel to Ceuta on Friday.

The Mayor-President of Ceuta, Juan Jesús Vivas, said the influx had overwhelmed the city’s reception system and left hundreds of migrants sleeping outside.

“We are facing a situation of absolute humanitarian and social emergency,” Vivas told radio station Cadena SER, adding that facilities for unaccompanied minors were operating at 2400 per cent of capacity.

In comments to radio station Onda Cero, he described the situation as a national emergency and called for a “decisive, forceful, immediate and coordinated” response under a single command structure.

Arrivals were currently averaging about 300 people a day, according to Vivas. At that pace, he warned, Ceuta could face a situation comparable to the May 2021 migration crisis, when 10,000 people entered the enclave in mere days.

Vivas also pointed to the human cost of the crossings, saying 60 bodies had been recovered at sea in recent months, and argued that stronger migration controls would help prevent further deaths.

With AP