More than 300 migrants, mostly Eritrean and Somali nationals, were on board the vehicle which overturned near the town of Bani Walid.
A child was among at least 19 migrants killed in the accident, the head of the town’s hospital, Salah al-Mabrouk, told AFP.
The hospital, which had earlier given a toll of 23 dead, said at least 124 migrants were injured and it was struggling to cope.
“Several victims are even being treated on the ground,” said spokesman Salah al-Twijer.
Since the 2011 overthrow and killing of longtime dictator Moamer Kadhafi, chaos-wracked Libya has become a key gateway for migrants trying to reach Europe, often on unseaworthy vessels.
Bani Walid, on the edge of the desert 170 kilometres (110 miles) southeast of the capital Tripoli, is a transit point for migrants heading to the Mediterranean coast.
Download our app and read this and other great stories on the move. Available for Android and iOS.