libya oil fire
Plumes of smoke rise in the sky after a rocket hit a fuel storage tank near the airport road in Tripoli Reuters

A fire burning at an oil depot close to the Libyan capital of Tripoli was "out of control" on Monday afternoon, a spokesman for the National Oil Corporation (NOC) said.

Firefighters had withdrawn from the scene, where a huge cloud of black smoke billowed across the skyline of the capital.

The blaze erupted on Sunday night and spread to a second site on Monday in what the government called a "very dangerous" development.

"The situation is very dangerous after a second fire broke out at another petroleum depot," the government said, warning of a "disaster with unforeseeable consequences".

The blaze erupted when a rocket hit a fuel storage tank containing around six million litres of gasoline, causing a huge fire.

The rocket was thought to have been fired by nearby militias that are engaged in a weeks-long battle over Tripoli international airport. The clashes have brought all flights to and from the airport to a halt.

Residents within three miles of the blaze, located on the road connecting Tripoli with the airport, were told to leave the area. The fuel depot is thought to contain fuel reserves of up to 90 million litres.

Libya's state-owned NOC had earlier warned that the blaze could produce an environmental disaster and called for "international help" to help tackle the escalating blaze.

The massive fire is the latest in a series of crises for the oil-rich North African state. Central government has struggled to rein in militias that proliferated in the rebellion that ousted the country's long-running leader Muammar Qaddafi.

Rival fighters have waged increasingly fierce battles in a bid to establish independent power bases across the country.