Moroccan police on Saturday said they arrested more than 20 Africans suspected of planning an illegal crossing into Spain, after a deadly attempt last month.
Police from the northern port city of Tangiers disrupted "an illegal immigration attempt and questioned 25 people originally from sub-Saharan Africa", the DGNS security service said, according to AFP.
It said in a separate statement that "36 homemade metal objects" were seized in a Tangiers shop that could be used for climbing, but did not specify which of two Spanish enclaves was targeted.
Spain's Ceuta and Melilla enclaves have the EU's only land borders with Africa.
Last month, at least 23 migrants died while trying to enter Melilla over border fences. They were among around 2,000 migrants, many from Sudan, who tried to break through the border fence, according to Moroccan authorities.
The DGNS said the suspects, living illegally in Morocco, were arrested at a checkpoint at the entrance to Tangiers immediately after they arrived on a public bus.
On Friday, the European Union and Morocco said they would step up cooperation to combat human trafficking.
At a meeting in Rabat, the two sides "agreed to renew their partnership in order to work together to tackle human smuggling networks, in particular following the emergence of new, extremely violent, methods adopted by such criminal networks", a joint statement said.