The Hague: Australia and East Timor have drawn up a draft treaty setting out their maritime borders, aiming to end a bitter dispute over lucrative oil and gasfields, officials said on Sunday.

“Timor Leste and Australia have reached agreement on the complete text of a draft treaty” in confidential talks in The Hague over the past week, the Permanent Court of Arbitration said in a statement.

It “delimits the maritime boundary between them in the Timor Sea and addresses the legal status of the Greater Sunrise gasfield,” the tribunal added.

Without giving any details, the court hailed the draft treaty hammered out after a deal was reached in August as a “pathway to the development of the resource, and the sharing of the resulting revenue.”

The two countries have been at loggerheads for a decade over the previous Certain Maritime Arrangements in the Timor Sea (CMATS) agreement between them, which carved up future revenue from oil and gas reserves in the area.

Impoverished East Timor, also known as Timor-Leste and which gained independence from Indonesian occupation in 2002, relies heavily on oil and gas exports.

In 2006 it signed the CMATS treaty with Australia, which covers the vast Greater Sunrise gasfield between the two nations that is worth billions of dollars.

But Dili later accused Canberra of spying to gain commercial advantage during the 2004 negotiations and demanded the treaty be ripped up.

Australia had argued the treaty was legal, binding and valid, but agreed to end it in line with Dili’s wishes on January 9.

The governments in East Timor and Australia will now have to approve the treaty, with the two countries set to meet again before the end of November in Singapore aiming to set a date for a signing ceremony some time in 2018.

Peter Taksoe-Jensen, the head of a conciliation commission set up by the tribunal to help steer the negotiations, praised the “constructive” atmosphere of the talks.

Dili and Canberra were “standing together to ensure that the resources of the seabed are developed to the benefit of both peoples,” he said.