About 30 others were found alive from the boat which rescue services had been searching for for two days in the sea between Spain's southern Andalusia region and northern Morocco, a coastguard spokeswoman said.
“Eleven people were found dead on board and 33 alive” — four women and 29 men, she told AFP.
Rescuers took the migrants, who came from sub-Saharan Africa, to the Spanish port of Almeria early Thursday.
The hospital in Almeria said one more died, bringing the toll to to 12 — 10 men and two women, one of them pregnant.
A representative of the Red Cross in Almeria said a further 12 migrants were still missing from the boat.
The coastguard is also searching for three other boats in the same area, each with between 50 and 55 migrants on board.
Spain has become the main point of entry into Europe for illegal migrants this year, ahead of Greece and Italy.
The International Organization for Migration says that more than 55,000 migrants have arrived in Spain by sea this year, and that 744 have died trying, more than three times as many as in 2017.