Military clashes followed by a political power struggle forced the National Oil Corporation (NOC) to halt exports at Ras Lanuf, Es Sider, Zueitina and Hariga terminals in late June and early July, threatening to keep offline as much as 850,000 barrels per day (bpd).
The ports were reopened on July 11 and eastern.fields gradually resumed operations. A lengthy shutdown at El Feel oilfield in the southwest also ended, but two days later output at the nearby 300,000 bpd Sharara was slashed after two staff were kidnapped.
But the risk of further output shocks will linger while Libya remains politically and militarily divided.
WHAT IS LIBYA'S POTENTIAL?
Around 1970 it produced more than 3 million bpd, and before the NATO-backed uprising in which Muammar Gaddafi was toppled and killed seven years ago, it was pumping more than 1.6 million.
WHY DID OUTPUT DROP AFTER 2011?
Since Libya's 2011 uprising, rival groups have used oil facilities as bargaining chips to press financial and political demands.
Power is split between shifting armed factions in the east and west, aligned with competing administrations.
They and other groups have cut off production at fields and ports, including a blockade of terminals in Libya's eastern.oil crescent from 2013-2016. Prolonged shutdowns have reduced pressure at wells.
Groups including Islamist militants have attacked and fought over oilfields and ports. Most the storage tanks at two major terminals, Es Sider and Ras Lanuf, have been damaged or destroyed. Fields including Mabruk and Ghani remain closed.
A lack of funding has been an additional drag on ageing infrastructure and regular power outages are a further constraint.
International companies have a limited presence onshore, keeping exploration and development programmes mostly on hold.
WHAT ARE THE CURRENT RISKS?
The Petroleum Facilities Guards (PFG) whose job is to protect oil installations often hold local agendas and loyalties. Guards shut down the 70,000-bpd El Feel field this year for more than four months.
Risk is also linked to Libya's domestic conflict.
In mid-June, a former PFG commander who had led earlier port blockades gathered opponents of eastern-based military chief Khalifa Haftar along with mercenaries to attack Ras Lanuf and Es Sider, held by Haftar's forces since 2016.
After the assault was repelled, Haftar and his allies said they would take control of most of Libya's oil through a parallel NOC in the eastern city of Benghazi, complaining that too many of the revenues flowing through the central bank in Tripoli had been passing to their rivals.
The standoff was resolved with a promise to look into central bank spending and a sanctions threat against those trying to bypass the internationally recognised NOC.
But the internationally recognised Government of National Accord (GNA) in Tripoli, which announced the investigation into spending, lacks authority.
WHAT ABOUT OPEC?
(This story has not been edited by Devdiscourse staff and is auto-generated from a syndicated feed.)