The bodies of 16 people have been pulled from the sea off the coast of Melilla, a small Spanish territory bordering Morocco.
Moroccan rescue services recovered the corpses after the crew of a Spanish ship spotted them in the water.
A medical official told AFP news agency all the dead were from sub-Saharan Africa, apart from one Moroccan.
It is thought they may have been hoping to reach Europe by sailing from Melilla, despite storm warnings.
Melilla, which is just 12 sq km (7 square miles), is a major crossing point for undocumented migrants seeking work or asylum in Europe.
It is one of only two EU land borders with Africa – the other being a second Spanish enclave, Ceuta.
Spanish newspaper El Pais reported the bodies were found floating on Saturday around 6-8 km from Melilla’s coast.
A spokeswoman for Melilla’s authorities said earlier that “about 20” bodies had been retrieved.
The exact death toll has not yet been confirmed. Spanish rescue services resumed a search on Sunday morning.