A truck bomb attack at a military training centre in a western town of Libya has killed and wounded dozens of people, according to reports.

Witnesses said on Thursday the truck crashed into the gate of the academy in the coastal city of Zliten, around 160 km east of the capital Tripoli.

Zliten mayor Miftah Lahmadi said the truck exploded as hundreds of recruits were gathering there and has left at least 40 people dead.

Libyan local news agency LANA, meanwhile, said that hundreds of recruits were performing morning exercises when it happened and has resulted in the death of at least 50 people.

Emergency has been declared in four local hospitals following the attack, according to reports.

The UN Special Representative to Libya, Martin Kobler, said that the blast was a suicide attack.

Meanwhile, fires caused by clashes between fighters of the Islamic State of Iraq and the Levant (ISIL) group and security forces at Libya's biggest oil ports have spread to five oil storage tanks that were still burning on Wednesday.

At least nine troops were killed and more than 40 wounded in fighting around the perimeter of the area on Monday and Tuesday, said Ali al-Hassi, a spokesman for the security forces.

Libya has been sliding deeper into conflict since the 2011 uprising, with rival governments and powerful militias battling for control of its main cities and oil wealth.

Courtesy Aljazeera