Some of the corpses were washed ashore on a beach near the Libyan capital, but most were on rocks off the suburb of Tajoura.
Some of the corpses were washed ashore on a beach near the Libyan capital, but most were on rocks off the suburb of Tajoura in a state of decomposition, an AFP photographer at the scene said.
The onset of warm weather has seen a surge in migrants boarding boats for the perilous journey across the Mediterranean, putting pressure on rescue services.
Italy's coastguard said more than 8,000 migrants had been rescued off the coast of Libya in a 48-hour period to Tuesday.
Its Libyan counterpart said it had rescued 147 migrants, including 19 women and four children, off the western town of Sabratha on Tuesday morning.
Most were young people from Cameroon, Sudan, Mali and Senegal, said Libyan navy spokesman General Ayoub Qassem.
They were found crammed aboard a makeshift rubber dinghy, said an AFP cameraman who was on the rescue boat.
The coastguard moved them one by one onto a rescue vessel.
Once on board, the migrants remained silent, tired and visibly disappointed at not reaching their destination.
On their arrival in the port of Zawiya, west of Tripoli, they were put in a truck to be taken to a detention centre in the town.
A woman clutching her baby sobbed in the truck, her dreams of reaching Europe having evaporated in a matter of hours -- along with the money she paid for the journey.
The navy spokesman, Qassem, said several migrant boats were spotted off Libya on Tuesday along with at least six privately operated ships "claiming to carry out rescue operations".
One of the vessels entered Libyan waters before the coastguard forced it to leave, he said, accusing the boats' operators of "complicity" with people smugglers.
Migrants intercepted or rescued by Libya's coastguard are usually held in detention centres until they are sent home.
But many become prey to extortion and abuse at the hands of human traffickers, who have exploited years of chaos in Libya to boost their lucrative but deadly trade.
More than 73,300 migrants have landed on Italy's shores since January, a 14-percent rise on the same period last year.
Just over 2,000 people have died or gone missing feared drowned while attempting the crossing since the beginning of 2017, according to the UN's refugee agency.