Zawiya, 40 km (25 miles) west of the capital Tripoli, is home to Libya's biggest functioning refinery, with a capacity of 120 000 barrels per day. The refinery is connected to the country's 300 000-barrels per day Sharara oilfield.
The NOC posted a picture showing a stream of leaked oil in the desert. Flow from the Hamada oilfields through the affected pipeline was immediately halted, the company said in a statement.
"In parallel with the maintenance work, a team of specialists is conducting an investigation to determine the causes of the leak. Arrangements and coordination are also underway to recover the leaked oil and address any resulting environmental pollution," the company added.
--Reuters--