Egypt’s Supreme Administrative Court has issued a final ruling declaring Egyptian sovereignty over the disputed Tiran and Sanafir islands in the Red Sea.

The decision follows a recent ruling by an appeals court earlier this month that upheld Cairo’s decision to give control of two Red Sea islands to Saudi Arabia.

The latest decision from the Supreme Administrative Court annuls the government and appeal court’s decision to hand sovereignty of the Tiran and Sanafir islands to Saudi Arabia in a deal that was agreed in April 2016.

Egyptian opposition groups have said an agreement between Cairo and Riyadh to redraw the Red Sea maritime border between the two countries, ceding sovereignty over two islands to Saudi Arabia, is unconstitutional.

Ownership of the uninhabited islands, which sit at the entrance to the Gulf of Aqaba, has long been disputed, with both Cairo and Riyadh claiming them, although they were under Egyptian control.

In late December, the Egyptian government approved the deal to hand over the islands and sent it to parliament for ratification.