At least 65 people were killed when one of Libya's worst truck bombs in years exploded at a police training centre in the town of Zliten, local officials and hospital sources said.
No group immediately claimed the attack, but the bombing was one of the deadliest since Islamist militants started expanding their presence in the chaos that followed the fall of Muammar Gaddafi in 2011.
A local official said the bomb detonated as recruits were gathering at the police centre in Zliten, a coastal town between the capital Tripoli and the port of Misrata.
Witnesses said residents were ferrying victims to Misrata hospitals in ambulances and cars, many with shrapnel wounds.
Medical sources said 65 people had been killed, including some civilians, though one official said between 50 and 60 had died.
Since the NATO-backed revolt ousted Gaddafi, Libya has slipped deeper into turmoil with two rival governments and a range of armed factions locked in a struggle for control of the North African state and its oil wealth.
In the chaos, so-called Islamic State militants have grown in strength, taking over the city of Sirte and launching attacks on oil fields. IS fighters this week attacked two major oil export terminals.
In February last year, three car bombs hit the eastern Libyan city of Qubbah, killing 40 people in what officials described as a revenge attack for Egyptian air strikes on Islamist militant targets.
Western powers are pushing Libya's factions to back a UN-brokered national unity government to join forces against IS, but the agreement faces major resistance from several factions on the ground.