Three women were among the dead taken to a morgue in the Moroccan city of Nador, a medical official there told AFP.
All were sub-Saharan Africans apart from one Moroccan, the official said.
A spokeswoman for Melilla's authorities earlier said "about 20" bodies had been recovered in Moroccan territorial waters.
The bodies of the migrants were spotted yesterday by a Spanish ship, which alerted the rescue services of both countries, she said.
Late yesterday, a Spanish police patrol boat found one more body, which was taken to Melilla, a Spanish enclave bordering Morocco.
Migrants are increasingly favouring the so-called western Mediterranean route to reach Europe, which involves making the sea crossing between North Africa and southern mainland Spain.
According to the International Organization for Migration, Spain has been the second most popular point of entry for migrants coming to Europe so far this year, with 1,279 arrivals, after Italy with 4,256.
It said 243 people have died or are missing in the Mediterranean after trying to cross the sea this year, not including those recovered this weekend.
Spain was last year the third point of entry for Europe- bound migrants, after Italy and Greece.
According to Omar Naji, of the Moroccan Association of Human Rights, migrants have been making the sea crossing after authorities tightened controls at the Melilla border fence.
"Before more migrants would try to climb the Melilla fence... but now, after stricter controls, they can only cross from the sea," he told AFP.
Naji said that migrants must pay people smugglers 3,000 euros each to undertake the sea crossing "and this traffic is carried out before the eyes of the authorities".
He also criticised the Moroccan authorities for "failing in its battle against illegal migration networks".
Disclaimer: No Business Standard Journalist was involved in creation of this content
