Fuel storage tanks that supply Tripoli were hit on Wednesday in clashes between rival Libyan militias, igniting a huge blaze near the international airport.
More than 40 people have been killed in some of the worst violence in the capital since the 2011 war that ousted Muammar Gaddafi, as rival brigades of former fighters battle with rockets and mortars for control of the airport.
Firefighters used foam spray to douse the flames at the fuel storage facility, bringing the blaze under control. Officials said only a semi-full tank had been hit by a shell.
Tripoli and the eastern city of Benghazi have faced days of heavy street fighting among armed brigades and militias who once battled Gaddafi and now want to claim what they see as their rightful share of power in post-war Libya.
A twin suicide bombing at a Libyan army base in Benghazi killed at least four solders on Tuesday, in an escalation of clashes between Islamist militants and regular forces battling to oust them from the eastern city.
Libya's fragile government, with no strong standing army of its own and hamstrung by political infighting, is struggling to impose order on the vast North African OPEC oil producer whose turmoil threatens to spill over its borders.
In another blow to the government, Libya's oil production has fallen this week, eroding increases since April in revenue for the state after officials managed to negotiate an end to a blockade of vital oil ports.
A spokesman for the National Oil Corporation said production on Monday had been at 450,000 barrels per day down from 555,000 bpd a few days earlier, partly because El-Feel oilfield had reduced output due to the clashes in Tripoli.
The clashes over the Tripoli airport have prompted the United Nations to pull its staff out of Libya, stopped most international flights and damaged more than a dozen planes parked at the airport.
By Patrick Markey