Egypt’s Court of Urgent Matters ruled on Sunday that a judicial decision to block the transfer of two Red Sea Islands to Saudi Arabia is void, judicial sources told Reuters, potentially reviving a deal which had triggered protests in Egypt.

A court in January rejected a government plan to transfer two uninhabited Red Sea islands to Saudi Arabia after a maritime demarcation accord was announced in April. The accord awarded sovereignty of the islands to Saudi Arabia.

The latest judicial decision is subject to appeal, and any final transfer agreement must be approved by parliament, but the latest twist comes as relations between Egypt and Saudi Arabia appear to be warming after months of tension.

Egyptian President Abdel Fattah al-Sisi accepted last week an invitation from Saudi Arabia’s King Salman to visit his country in April, a move that came on the heels of the kingdom’s decision to restore oil aid shipments to Egypt after a roughly six-month halt.

The ongoing island litigation had previously been a source of unease between Egypt and Saudi Arabia, which gave its ally with tens of billions of dollars in aid in recent years.

Saudi and Egyptian officials had argued that the islands belonged to Saudi Arabia and were only under Egyptian control because Riyadh asked Cairo in 1950 to protect them.

But lawyers who had opposed the accord said Egypt’s sovereignty over the islands dated back to a treaty in 1906, before Saudi Arabia was founded.