"A group of unknown people tried to attack the depot, causing this unfortunate incident" in Brak al-Shati, 650 kilometres south of Tripoli," General Mohamed al-Dhabi told AFP.
State television reported that a group of civilians, among them African immigrants, had been trying to steal the ammunition in order to remove its valuable copper when the explosions occurred.
It said an unspecified number of people had been killed and wounded.