At least 50 people were killed Thursday in a truck bombing targeting a police camp in the Libyan coastal city of Zliten, a medical official said.
The attack also injured around 127 people, the director of the town's hospital, Abdel-Motleb bin Halim, told Libya's official news agency LANA.
Hospitals in Zliten, around 160 kilometres east of the capital Tripoli, have appealed to local residents to donate blood for the injured victims of the attack, according to LANA.
The truck packed with explosives crashed into the gate of the camp where coastguards are trained, local officials said.
No one has claimed responsibility for the attack, but the bombing is suspected to have been carried out by loyalists of the Islamic State terrorist militia.
"We have information that a boat carrying strangers arrived in the town two days ago," Siarj al-Rashdi, an official at the Zliten security directorate, told dpa.
"Yesterday we mounted a campaign to collect all strangers staying in the town illegally. But unfortunately, this did not stop the disaster."
Zliten is a commercial town not known for sheltering militants. The town is also regarded as a centre for illegal migrants seeking to reach Europe.
Libya has been gripped by fighting between rival militias since the 2011 uprising that toppled longtime dictator Moamer Gaddafi.
The oil-rich country is also split between two competing parliaments, each backed by different militias.
Islamic State has taken advantage of the anarchy to establish a foothold in Libya.