Jihadist attacks and political struggles are thwarting attempts by Libya's unity government to revive an oil industry seen as vital for the economy of the impoverished North African country.
Five years since the fall of dictator Moamer Kadhafi, Libya's rival governments and militias are in a bitter struggle for control of crude exports.
The political turmoil, coupled with Islamic State (IS) group attacks on oil facilities, has brought shipments to a near-standstill.
Despite having Africa's largest oil reserves, estimated at around 48 billion barrels, Libya has only managed to export a few tankers of crude in recent months.
On August 1, the Tripoli-based National Oil Company (NOC) announced that it was preparing to restart regular exports of crude.
But analysts doubt Libyan oil will be gushing back to world markets just yet.
"Opening the ports allows the NOC to start to undertake repairs, but that will still take time," said Scott Modell, an analyst at energy consultancy Rapidan Group.
"One announcement about potentially opening ports that are not fully functional is not going to turn around the overall trajectory of the political process," he added.
Since 2010, the country's production has plummeted from 1.5 million barrels per day (bpd) to just 300,000 bpd.
Libya now has the smallest production of any member of the Organization of Petroleum Exporting Countries (OPEC).
The 2014 collapse in oil prices was a further blow. Industry sources say Libya's exports this year will earn it just a tenth of the estimated $45-50 billion (40-45 billion euros) it took in 2010.
That is a disaster in a country where the government depends on oil exports for nearly all of its revenue.
Struggle for control
Libya's Tripoli-based Government of National Accord (GNA) faces major obstacles as it tries to revive the sector.
For a start, the NOC is split into two rival branches -- one loyal to the GNA and the other based in Benghazi and loyal to a rival government.
Meanwhile, all of the country's export terminals in Libya's eastern "oil crescent" are controlled by the Petroleum Facilities Guard (PFG), a militia set up to protect them.
They include the two key export terminals of Ras Lanuf and Al-Sidra, 650 kilometres (400 miles) east of the capital, which are together capable of handling 700,000 bpd.
But they were shut down in January after storage tanks were set on fire during attacks by IS.
The jihadists have taken advantage of the turmoil to establish a presence in Libya, but now appear close to losing their stronghold in Sirte which lies between Tripoli and the oil crescent.
PFG leader Ibrahim al-Jadhran also regularly defies both of Libya's rival governments.
"The blockage costs Libya $30 million (27 million euros) a day," Mustafa Sanalla, chairman of the Tripoli-based branch of the NOC which supports the unity government, said in April.
At the end of July, the GNA announced that it had reached an agreement with Jadhran to re-open the Ras Lanuf and Al-Sidra export terminals.
The NOC said the unity government had agreed to pay salaries to the oil installation guards and provide them with schools and hospitals.
That agreement underlined the bitter struggle between the GNA and a rival administration based in Libya's far east that refuses to recognise the unity government.
It controls much of the east through part of the Libyan army led by general Khalifa Haftar, and runs a rival NOC out of Benghazi.
After the GNA's agreement with Jadhran, Haftar's forces told AFP they would bomb tankers approaching the Libyan coast without the Benghazi NOC's permission.
It also moved troops towards the Zueitina terminal, another major facility on the oil crescent.
But the Petroleum Facilities Guard said it was prepared to fight.
"We will not let them control the ports," said spokesman Ali al-Hassi.
The standoff appears to have stalled an agreement, announced on July 3, to unify the rival NOCs.
Germany, Spain, the United States, France, Italy and Britain have called for all the country's oil installations to be immediately handed over to the GNA.
A Libyan oil industry veteran, who did not want to be named, said the country could only restore oil exports if there was "a strong unified government and a single military force".
"As long as there are still ongoing political and power struggles... the resumption of full oil production and exports can never be achieved."