Egypt and Israel have agreed to a $500 million settlement over a long running dispute over a 2012 gas deal that collapsed following attacks by insurgents in the Sinai Peninsula.

The final amount agreed is significantly smaller than the amount Egypt was ordered to pay by the International Chamber of Commerce in 2015. Four years ago the chamber ordered Cairo to pay $1.8 billion in compensation. However Egypt appealed the decision and began discussions on a settlement.

The defunct deal was signed between Egypt and state-owned Israel Electric Corp. According to a Reuters report the Egyptian General Petroleum Corporation (EGPC) and Egyptian Natural Gas (EGAS) confirmed the deal in a statement yesterday saying that the agreement was reached with government support and as part of efforts to ensure a “conducive investment environment”.

No explanation was given for why Israel settled for half a billion instead of the $1.8 billion which the Chamber ordered Cairo to pay. The two countries, nonetheless, have signed major energy deals since.

Israel’s Delek Drilling and its partner Noble Energy signed a landmark deal early last year to export $15 billion in natural gas from Israeli offshore fields Tamar and Leviathan to a customer in Egypt. Pumping from the Tamar gas field in the Mediterranean Sea to Egypt started earlier this month.

READ: Egypt mulls selling power plants to foreign investors