The Spanish navy went to the rescue of the migrants after their overcrowded dinghy near the island of Alboran, halfway between Spain's southern coast and its North African enclave of Melilla on Tuesday.
Authorities said that on Wednesday morning they recovered the bodies of a ten-year-old girl as well as a woman and a man after the boat capsized.
A pregnant woman was airlifted to hospital in Almeria from the vessel and the remaining group of 29 people on board were taken safely to land.
"They are from sub-Saharan Africa, but we do not know which country," a spokesman from the coastguard said.
Meanwhile on Wednesday, the coastguard saved another nine migrants, all sub-Saharan African men apparently in good health, rescued from a small boat off the coast of Tarifa on Spain's southernmost tip.
Salvamar Arcturus rescata a 9 hombres subsaharianos de una patera a 10,5 milas de #Tarifa. Todos en aparente buen estado.— SALVAMENTO MARÍTIMO (@salvamentogob) April 12, 2017