"Coastguards of the kingdom's navy operating in the Mediterranean and Atlantic rescued 552 illegal migrants of varying nationalities between April 8 and 18," mostly from sub-Saharan African countries, the military source told official news agency MAP.
The source said among them were people attempting the crossing aboard makeshift boats, in canoes, on jet skis and "even swimming".
Earlier this month 11 migrants - eight Moroccans and three from other African countries - drowned when their boat sank in the Atlantic as they were trying to reach the Canaries.
Morocco in northwest Africa is a transit country for many migrants trying to get to Europe - Spain's mainland or its Canary Islands in the Atlantic.
According to the United Nations, the first quarter of 2023 was the deadliest since 2017 for Europe-bound migrants in the Mediterranean.