Dozens of would-be migrants have swum or waded to a the island of Isla de Tierra. The island, part of the Alhucemas archipelago, belongs to Spain and is just thirty metres from Morocco at low tide.
Madrid and Rabat say they will each accept a share of the would-be migrants.
Another group, of around 160 people, attempted to cross the fence separating Morocco from the Spanish enclave of Melilla.
Spain’s Foreign Minister Manuel Garcia-Margallo believes the two events were highly organised.
“If you take into account the coincidence between the assault on the fence and the operation in the archipelago, these actions have been coordinated by human traffickers”, he said.