Porters at the El Tarajal border crossing on Wednesday. Joaquín Sánchez

The Interior Ministry said police and civil guards would be posted to the El Tarajal crossing – which is used by Moroccans to bring duty-free consumer items bought in Spanish territory into Morocco – while security measures are beefed up.

“This is the first time. Never before has it been closed for this reason,” said a government representative in Ceuta after 187 migrants stormed the crossing in the early hours of Monday morning.

These attempts to breach the border are happening with increasing frequency Spanish government source

The ban will be in force until August 16.

Spanish government sources estimate there are around 1,500 mainly African men and women hiding in the forested hillsides around Ceuta waiting for their opportunity to enter Spanish territory. Other sources put the figure as high as 3,000.

Similar numbers of migrants were reported to be present in and around Ceuta in the run-up to the February 2014 tragedy when 15 people drowned trying to swim into Spanish waters.

“The difference now is that these attempts to breach the border are happening with increasing frequency and migrants are almost making it to the fence,” said a government spokesman.

On Monday, migrants were able to break open the main gate while security forces were patrolling a different area of the fence, the so-called Finca Berrocal, which is a blind spot, having received information that a large group was going to try to enter there.

Some 12,000 vehicles cross through El Tarajal each day to buy duty free goods in Spain

“There was a failure… We are looking into what could have happened,” said Nicolás Fernández Cucurull, the Spanish government’s delegate in Ceuta.

Police sources say that the first measures to strengthen security were taken on Tuesday evening, with Civil Guard riot police deployed along eight kilometers of the border, while police units were placed at the El Tarajal crossing. The closure of the crossing to goods was then announced. “This is to prioritize the efforts of the security forces to prevent the continuous attempts to cross the border illegally by Africans,” added the authorities.

The Spanish government says Morocco is cooperating, and that Moroccan police reportedly prevented some 200 migrants from approaching El Tarajal in the early hours of Wednesday morning. Another group of around 200 reportedly tried to breach the Finca Berrocal area of the border fence around 6am.

“At the moment, we are on alert for other possible breaches,” said Ana Rosado, with the human rights group Asociación Pro-Derechos Humanos, adding that the situation was likely to last for several days more. “They [the migrants] are well-informed about what is going on in Ceuta and during the holiday season, they know there will be fewer officers and will try to pass through,” says Rosado.

Spain’s interior minister, Juan Ignacio Zoido, visited Ceuta in June and promised further resources to improve security.

Each day, some 12,000 vehicles cross through El Tarajal to buy duty free goods in Spain and bring them back into Morocco. Added to this are an average of 3,000 porters who carry huge loads on their backs. The Spanish authorities say that managing the goods crossing takes up most of their resources.