At least 47 African migrants died of hunger and thirst after their boats drifted into Mauritanian waters.
Mauritanian soldiers who discovered the two vessels off the northern port of Nouadhibou also found more than 90 survivors on board, officials said.
Police found 42 bodies in the sea and five survivors later died in hospital.
The survivors are said to be exhausted after more than two weeks at sea without enough food and water. They set sail from southern Senegal last month.
The authorities believe the boats, carrying Senegalese, Gambians and Malians, were trying to reach Spain's Canary Islands when they encountered problems.
The survivors told Mauritanian officials that they had thrown the dead overboard, including the captain of one of the vessels.
The survivors were exhausted, and many appeared to be in shock, said Mohamed Ould Hamada, head of the Mauritanian branch of the Red Cross in Nouadhibou.
"We are helping with feeding, medicine and with hospital care," he said.
Hundreds of people drown each year trying to cross from sub-Saharan Africa to the Canary Islands.
Spanish Interior Minister Alfredo Perez Rubalcaba said last month that the numbers of migrants was down sharply this year to 13,000, from 35,000 last year.
He said a new European surveillance system with aircraft and ships posted off the coast of Africa was discouraging Africans from the perilous journey. ( BBC )