Hundreds of migrants have been blocked by police from crossing into the Spanish enclave of Ceuta after a flurry of social media posts urging people to seek asylum, repeating some of the pressure on the border only weeks ago.

Moroccan police stopped more than 200 migrants from rushing the border and arrested 61 to bring the situation under control, according to official statements on Saturday afternoon (early on Sunday, AEST).

The police action sought to prevent a repeat of the border crisis two weeks ago when an estimated 72,000 people crossed from Morocco into Ceuta in the apparent belief they could gain asylum and move to Spain.

Almost all those migrants were returned to Morocco in the early days of this month, but about 5000 remain, and some children are expected to be taken to the Spanish mainland.

The outcome has fuelled social media posts about further attempts to cross into Ceuta despite warnings from Spanish and Moroccan authorities about the risk of drowning by attempting to swim to the enclave on the northern coast of Africa.

Videos showed hundreds of migrants rushing across land on the Moroccan side of the border in an attempt to cross into Ceuta, with Spanish newspapers El Pais and El Mundo reporting on the events.

The migrants were almost all from sub-Saharan Africa and had been hiding on the outskirts of Castillejos, a town on the border with Ceuta, according to El Pais.

Moroccan police charged at the migrants and intercepted 111 people who were trying to reach the Ceuta border, and then arrested 61 of them for inciting illegal migration.

A source in Morocco’s Interior Ministry told Reuters that the 111 detainees included 109 migrants from sub-Saharan Africa and two Moroccan citizens.

Moroccan media estimated there were 249 migrants in total who tried to cross the border.

While the total number is dramatically lower than the 72,000 who crossed into Ceuta two weeks ago, the moves highlighted tensions at the border and the debate about whether Moroccan authorities were doing enough to stop people crossing.

“We’ll continue to deploy whatever personnel are necessary to restore normality as soon as possible and prevent events like those of July 30 from happening again,” Interior Minister Fernando Grande-Marlaska said on Thursday.

About 5,000 migrants remained in Ceuta, the minister said. Reuters saw hundreds sheltering from scorching heat under makeshift bamboo shelters on the urban beach of El Trampolin.

Grande-Marlaska said migrants who entered irregularly would not be allowed to stay in the enclave, travel to mainland Spain or obtain legal status, except in rare cases involving extreme vulnerability. Those without a right to remain would be returned to Morocco, he said.

Moroccan police said they were transporting the asylum seekers on buses chartered by the authorities to locations such as Ouarzazate, more than 800 kilometres from the Spanish border.

With Reuters