The rebels reached the deal with the government on Sunday, paving the way for handing over the two terminals this week and cede the other two ports – Ra’s Lanuf and Sidra -- within two to four weeks.

The rebels seized the four oil terminals last July to pursuit their campaign for autonomy in the eastern Cyrenaica region. The move cut oil exports by 1.25 million barrels per day, costing the country more than $14 billion in lost revenues.

Militant tribes in both eastern and western oil-producing regions are demanding a bigger share of the country's oil wealth.

Libya has been witnessing numerous clashes between government forces and rival militia groups, who played a key role in the 2011 popular uprising that toppled former dictator Muammar Gaddafi.

On March 12, the United Nations Security Council unanimously adopted a resolution, authorizing sanctions against illegal crude exports from Libya’s militant-held oil facilities.