A navy rescue plane had been searching since Monday for a makeshift boat which had set off from the northern Morocco coast not far from the Spanish enclave of Melilla. After finding it the spotters also found a second one.
All the migrants, who appeared in reasonable condition, were handed over to the Red Cross in the southeastern port of Almeria, Spain's sea rescue service said.
On Saturday, 92 migrants were rescued off the Spanish coast in several operations.
The International Organization for Migration (IOM) says 5,445 migrants arrived by sea in Spain between January and September, while 62 people died while making the crossing.