Morocco's navy has intercepted 257 migrants at sea over four days, state media reported on Tuesday.
It comes two weeks after at least 23 migrants were killed in a border stampede.
"Navy coast guards on maritime patrol in the Mediterranean and the Atlantic, rescued ... 257 people attempting irregular migration, having attempted a perilous crossing aboard makeshift boats, kayaks and even swimming," said a military official, according to the official MAP news agency.
Most of the migrants, including men and women as well as children, came from African nations, the report said.
The group also included an Afghan and a Yemeni. The report said they were brought safely to shore.
Last month, at least 23 migrants died trying to climb border fences into the Spanish enclave of Melilla, on Morocco's Mediterranean coast.
Non-governmental organisations say at least 37 migrants died, a toll higher than the official figure.
The victims were among about 2,000 migrants, many from Sudan, who staged a mass storming of the barrier, the Moroccan authorities reported.
It was the worst-recorded death toll in years of attempts by migrants to enter Ceuta and Melilla, the only land borders between Africa and the EU.
Tens of thousands arrive on Spanish shores
Migrants, often fleeing violence and food insecurity at home, have also continued to try to reach Spain by boat.
More than 40,000 migrants, mostly from Morocco, arrived in Spain in 2021 by sea, the Spanish Interior Ministry said.
Over the first five months of 2022, arrivals increased by 12 per cent compared with 2021, it said. But the normalisation of diplomatic relations between Spain and Morocco has led to a decrease in recent weeks.
Across the Mediterranean region, governments in North Africa and Europe face growing challenges to address a worsening humanitarian crisis, as populations seek to escape climate change and conflict.
The number of migrants fleeing Sub-Saharan Africa and war-torn countries in the arid Sahel region — risking their lives to cross the Mediterranean — is expected to surge to 2.5 million by 2030, a report last year by the Vienna Institute for International Economic Studies said.