They were found clinging to the wreckage, sea rescue services said. One of those rescued said there had been 54 people in the boat.
Four African migrants drowned and up to 35 were missing after their boat sank in the Mediterranean in the early hours of Thursday around 40 miles (65 km) north of the Moroccan coast, Spanish sea rescue services said.
Lifeguards pulled four bodies from the sea after they were spotted by a Colombian military helicopter helping in the search, a sea rescue spokesman said. The spokesman could not say whether the recovered bodies were male or female.
Earlier, 15 people including two women were rescued from the boat after it lost its bottom and sank. They were found clinging to the wreckage, sea rescue services said. One of those rescued said there had been 54 people in the boat.
The Mediterranean between Morocco and Spain was a major route around 10 years ago for migrants from Africa trying to reach Europe, but numbers fell after Spain increased patrols.
The search for survivors and bodies continues. The survivors have been taken to the southern Spanish city of Malaga.