Mauritanian navy officials were searching for the missing boat after fishermen found the bodies of two men floating at sea.
The officials said on Monday that another boat carrying 25 people from Mauritania, Gambia, Senegal and Mali was rescued on Saturday afternoon after it had drifted for weeks along the coast of Mauritania following problems with its motors.
Both vessels had left the Mauritanian port of Nouadhibou, close to the northern border with Western Sahara, on the 800km-long voyage to the Canary Islands.
One 25-year-old survivor said: "We left Nouadhibou more than a month ago and we went 17 days without food. We had nothing to drink but sea water."
The man said each passenger had paid the equivalent of $1,200 for the trip. Around 20 of them were being treated in the capital Nouakchott for exhaustion, starvation and dehydration.
Their boat was rescued 30km from Nouakchott after having drifted on ocean currents 500km south of Nouadhibou.
Poor and unemployed
More than two-thirds of the population of West Africa are under 30-years-old, and unemployment in some countries tops 50%, leaving many with no hope of finding a job.
Mauritania signed a deal with Spain last month to try to stem the rising tide of migrants attempting the dangerous crossing.
"We left Nouadhibou more than a month ago and we went 17 days without food. We had nothing to drink but sea water"
A 25-year-old survivor
The two governments agreed to mount joint coastal patrols and to crack down on people-trafficking networks.
The governor of Nouadhibou estimated in March that about 1,000 sub-Saharan Africans were arriving in the port every month to attempt the crossing, one of the main routes into Europe.
The immigrants shifted to Mauritania after Moroccan officials clamped down on attempts to enter Spain's north African enclaves of Ceuta and Melilla last year.
The open, mostly wooden fishing boats normally used by the immigrants are often unable to withstand storms or rough seas.