Libyan rebels occupying four eastern oil ports have agreed with the government to gradually end their eight-month petroleum blockade, which has cost the North African state billions in revenue.
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 on Sunday.
Ending the oil port stand-off 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," the justice minister, Salah al-Marghani, said, reading out the agreement.
He said the two larger ports would be reopened in no more than four weeks, after more discussions with the rebels.
Top rebel leader Ibrahim Jathran confirmed the blockage of Zueitina and Hariga ports had ended. "We did this out of goodwill, to build trust, have a dialogue and solve all problems between Libyans by peaceful means," he said in a short speech broadcast by a rebel television station from Zueitina terminal.
"We will undertake more measures to strengthen these intentions provided the government fulfils its part," he said, in an apparent reference to the reopening of the remaining ports. "We serve Libya's interests."
Neither side commented on what rebel demands still needed to be negotiated with the government, leaving room for delays in reopening the larger ports.