Dozens of people were believed to be killed in an explosion at a weapons cache in southern Libya.

Military officials said the blast occurred as a group of looters tried to raid the depot containing tank ammunition at an airbase in the town of Brak al-Shati, 650km south of Tripoli.

"A group of unknown people tried to attack the depot, causing this unfortunate incident," General Mohamed al-Dhabi told AFP.

Authorities gave conflicting figures on the number of casualties. Al-Dhabi said 10 people had died and 15 people had been injured. However, the commander of a border security guard brigade in the town said the death toll was higher.

"More than 40 people were killed," said Commander Khalifa Alsghair.

A local hospital said it was treating a handful of people who were injured in the blast.

State television said the explosion came as a group of 43 civilians, including locals and African immigrants, stormed the base in an attempt to steal ammunition and copper.

It was not immediately clear what triggered the explosion, which started a fire.

In a separate incident four soldiers were killed in clashes between security forces and Islamist militants from the Ansar al-Sharia group in Benghazi.

Libya has been in turmoil ever since the removal of Muammar Gaddafi from power two years ago and the fragile central government has been struggling to ensure security over its large territory.

The country is fragmented by conflicting tribal loyalties. Militia groups, including Islamist cells, are rife and control large swaths of land.