Spanish authorities said that 150 migrants managed to enter the enclave in a major assault on the fence since the 2018 summer.
Moroccan authorities said that 9 migrants were injured in the attempt and 90 others arrested.
Morocco has by July prevented 57,000 migrants from illegally crossing to Spain by sea and Land, government spokesman said.
Morocco has played a key role in curbing the flow of would-be migrants to Spain.
Reaching Spain from Morocco has become harder, riskier and more expensive. The latest data on irregular migrant arrivals through this route, covering the present year to Tuesday of this week, shows a 39% drop compared with the same period in 2018, for a total of 18,018 people.
The Spanish government of Pedro Sánchez has presented Morocco as a strategic partner in the fight against unauthorized immigration, and got Brussels to extend a €140 million check to that country in exchange for its assistance. Spain added recently €32 million in support to Morocco.