TRIPOLI/BENGHAZI, Libya (Reuters) - Libyan rebels occupying four eastern oil ports agreed with the government on Sunday to end their eight-month petroleum blockade that has cost the North African state billions in lost revenues.
Zueitina and Hariga ports, held by federalist rebels demanding more autonomy from Tripoli, will open immediately while the larger ports, Ras Lanuf and Es Sider, will be freed in two to four weeks after more talks, the government said.
Ending the oil port standoff will be a major advance for Libya's fragile government which has struggled to impose its authority over an unruly nation still in flux nearly three years after the fall of Muammar Gaddafi.
"The ports Zueitina and Hariga will be handed over to the state with the signature of this agreement. The protesters are banned from returning or obstructing work at the ports," Justice Minister Salah al-Marghani said, reading out the agreement.
He said the two larger ports will be reopened in no more than four weeks, after more discussions with the rebels.
Zueitina and Hariga ports account for around 200,000 barrels per day of export capacity while the larger ports previously shipped around 500,000 bpd of Libya's crude.
Storage tanks are full at the ports, and loading the crude will be straightforward. But getting the tanks resupplied from oilfields will take time.
The reopening of the eastern oil ports could bump up Libya's output from around 150,000 bpd, but nowhere near the 1.4 million bpd it produced before last summer.
Rebel leader Ibrahim Jathran, who seized three of the ports with thousands of his troops, is a former anti-Gaddafi fighter, who later become head of a state-run oil facilities guard before he turned against Tripoli.
Hariga port was closed by another group of federalist protesters who sympathized with Jathran's cause.
The minister said the agreement calls for all charges to be dropped against Jathran's oil protection force, and for them to receive their oil guard salary payments according to the law.
A committee would be formed to investigate financial and administration corruption since Libya's liberation from Gaddafi, one of the demands made by Jathran's movement.
But the one-page agreement did not mention the rebels' other key demands - more autonomy and a greater share of oil revenue for their eastern region, known as Cyrenaica, one of Libya's three regions before Gaddafi.
The shutdown has cost the state billions of dollars in lost oil revenues.
Support had been waning for Jathran's protest in the east, where divisions had begun to emerge over whether to continue the blockade.
Talks to end the standoff advanced after the federalist rebels last month managed to load crude onto a tanker at Es Sider and forced it out to sea in an attempt to export the cargo.
U.S. commandos later boarded the formerly North Korean-flagged vessel in international waters and returned it to Libya, in a major blow to the federalists' plan to bypass Tripoli and sell oil independently on the global market.
(Additional reporting by Feras Bosalum; Writing by Patrick Markey; Editing by Gareth Jones and Mohammad Zargham)