Eight migrants including six children were found dead on Monday after suffocating from petrol fumes while packed in a lorry container on the west Libyan coast.
Another 90 migrants recovered from the container were in critical condition and had been taken to a local hospital for treatment, the security directorate in the town of Zuwara said.
Zuwara is one of the points along Libya's western coastline where smugglers and traffickers hold migrants before putting them on boats to try to cross to Europe.
The migrants were from various sub-Saharan African and Arab countries, as well as Pakistan and Bangladesh, the security directorate statement said. They had been shut inside a refrigerated container designed for transporting meat or fish which was found just outside Zuwara, close to the Mellitah oil and gas complex.
Zuwara is about 110 kilometres from the capital, Tripoli.
"As a result of the length of time they were suffocated, eight of them died including six children, one woman and a young man," the security directorate said, adding that gallons of petrol had been found in the container.
It posted pictures of at least nine plastic jerry cans inside the container, as well as a pile of life-jackets apparently intended for use in a boat crossing.
Daytime temperatures in northwest Libya have been in the mid to high 30s Celsius in recent days.
Smugglers and traffickers took advantage of Libya's lawlessness to send hundreds of thousands of migrants to Italy over the past four years, though flows have slowed since last summer due to an Italian-backed crackdown on smuggling networks.
Meanwhile, hundreds of migrants finally disembarked in Italy from two ships on Monday after other European Union countries agreed to accept more than half of them, ending a diplomatic standoff that had left them stuck at sea.
The remaining migrants aboard the Italian ship Monte Sperone and the British naval vessel Protector, which had picked up 450 asylum seekers from an overcrowded boat that left Libya on Friday, came ashore at the Sicilian port of Pozzallo.
At least eight suspected people smugglers were driven away in police cars, while identification procedures were begun in the port for the other migrants.
Italy's Interior Minister Matteo Salvini, who had insisted that EU partners should take them in, said the offer by five countries to accept 50 migrants each had vindicated his hard-line immigration stance.
"Firmness and consistency pays off," Mr Salvini, who is leading a high-profile campaign to exclude humanitarian rescue ships from Italian ports, said late on Sunday.
Eight of the migrants in bad medical condition were allowed to land on the Italian island of Lampedusa on Saturday and another 27 women and children had disembarked in Pozzallo on Sunday.
"The next objective, to eradicate all the people-smuggling mafias, will be to re-accompany the immigrants back where they came from," said Mr Salvini, who leads the right-wing League.
He was speaking after Germany, France, Malta, Spain and Portugal each agreed to accept a share of the migrants.
Mr Salvini argues that European countries should find a way to block the migrants before they leave Africa or send boats with asylum seekers back to the ports where they came from, including to Libya's harbours.
However, under international law, refugees cannot be returned to a place where their lives are in danger. Both the United Nations and EU have ruled that Libya is not safe.
With Italy taking a harder line on migrants, the number of those rying to cross to Spain has increased.
Spain's Maritime Rescue Service said at least 479 people, including more than 100 children, were rescued over the weekend while attempting to cross a narrow stretch of the Mediterranean Sea from North Africa.
The service said 330 migrants were rescued on Saturday, most of them in the Strait of Gibraltar area and some further east in a part of the Mediterranean known as the Alboran Sea.
They included about 100 minors who were picked up by a Spanish Civil Guard vessel and a Moroccan man who was found drifting on an inflated inner tube from a truck tyre.
The rescue service said another 149 people were brought ashore on Sunday.
The United Nations' International Organisation for Migration said last week that more than 16,900 migrants had arrived in Spain so far this year, a figure close to the number of arrivals in Italy.