Morocco says more than 12,000 illegal migrants held in 2021
In a statement carried by the official MAP agency, the Directorate General of National Security said it had detained "415 organisers and mediators and 12,231 candidates for illegal immigration" and dismantled "150 criminal networks active in organising illegal immigration".
Mainland Spain is only about 20 kilometres (12 miles) from Morocco, making it a target for those fleeing poverty or conflicts elsewhere in Africa or even further afield.
Officers also seized "752 forged travel documents, 67 inflatable boats and 47 engines, and 65 vehicles", MAP said.
The year's figures relate only to police operations, and do not include naval interceptions of migrants headed to Spain.
A military source said the Moroccan coastguard aided around 330 migrants between November 12 and 15 in both the Atlantic and the Mediterranean.
At the end of September, the UN's International Organization for Migration said 2021 had been "the deadliest year on the migratory route to Spain", with more than 1,000 fatalities.
Other North African countries, Tunisia and Libya, are also major migrant departure points to Europe.