Egypt's plan to hand two Red Sea islands over to Saudi Arabia has been struck down by an administrative court, in a major blow to President Abdel-Fattah al-Sissi on one of the most controversial issues he's faced since taking office.
The courtroom erupted in cheers as judge Yahya al-Dakrouri ruled that the government's signature of a border demarcation agreement during Saudi King Salman's visit to Cairo in April was null and void.
The islands should remain sovereign Egyptian territory, al-Dakrouri ruled in a brief summary verdict, which is subject to appeal.
Khaled Daoud, a leading figure in the campaign against the handover of the islands, told dpa that the ruling was "a major victory."
The government was considering an appeal to the Supreme Administrative Court, the minister for legal and parliamentary affairs, Magdy El-Agati, told state-run news site Ahram Online.
The plan to hand the strategic islands of Tiran and Sanafir over to Saudi Arabia led on April 15 to some of Egypt's largest non-Islamist protests since al-Sissi took office.
Activists attempted to repeat the protests in late April, but were foiled by a wave of what lawyers said were more than 1,000 arrests and a police clampdown on the streets.
For Egyptian opposition activists, battered by almost three years of a harsh crackdown on dissent, the agreement was a golden opportunity to attack al-Sissi's government - which has vaunted its nationalist credentials - as unpatriotic.
Opponents charged that the handover was payback for billions of dollars of aid and financing provided by Saudi Arabia since al-Sissi - then head of the armed forces - deposed Islamist president Mohammed Morsi in 2013.
The Egyptian government said that a joint committee of experts had established that the islands were originally Saudi territory which had been under Egyptian protection by joint agreement.
It pointed to a 1990 decree by former president Hosny Mubarak concerning Egypt's maritime boundaries, which did not include the islands, as well as a US diplomatic note and references in academic documents.
At the time, al-Sissi, in a lengthy televised address before the attempted protests, asked the public not to discuss the agreement, saying it should be considered only by the parliament.
The Egyptian constitution prohibits the handover of any national territory, and requires any other international agreements involving issues of sovereignty to be submitted to a referendum.
The suit, filed by activist lawyer Khaled Ali, had argued that either the decision was barred as a cession of sovereign territory or that it should have been submitted to referendum.
Daoud said he now hoped that "all the ... young men who remain in prison for protesting against this agreement will be released."
Some 15 to 20 opponents of the agreement, including Malek Adly, one of the lawyers who filed the court case against the handover, are still in detention and potentially face serious charges, he added.