The Supreme Court ruled that no other court had jurisdiction over the matter, blocking two opposing verdicts - one by the Supreme Administrative Court, which was against ceding control of the islands of Tiran and Sanafir, the other by the Court of Urgent Matters, which looked to void that decision.
“The signature of the representative of the Egyptian state on the maritime borders agreement between the governments of Egypt and Saudi Arabia is undoubtedly an act of sovereignty,” the Supreme Court said in a statement, adding that approving the deal was down to Egypt’s legislative body.
Prince Mohamed signed the deal on behalf of the Kingdom before becoming crown prince.
Egypt’s parliament backed the deal in June, and Egyptian President Abdel-Fattah al-Sissi ratified it one week later.
Opponents say Egypt’s sovereignty over the islands dates back to 1906, before Saudi Arabia was founded.
- Egypt's Sissi: 'Defaming' security forces is 'high treason'
- Israel finds new regional allies: Greece and the Sunni states
- Will Saudi Arabia follow Iran and seek nukes?
Saudi and Egyptian officials say the islands belong to the kingdom and were only under Egyptian control because Riyadh had asked Cairo in 1950 to protect them.
Saudi Arabia has supported Sissi since he toppled President Mohamed Mursi of the Muslim Brotherhood in 2013, and legal wrangling over the Red Sea deal was a source of tension between the two countries.
Opposition to the deal has been a problem for Sissi, sparking the only major street protests since he came to power in 2014 and becoming a rallying point for opposition figures that have been marginalized during his rule.
Sissi stands for re-election this month in a vote he is almost guaranteed to win after all serious challengers dropped out, including rights lawyer Khaled Ali, who shot to fame after successfully challenging the islands deal in court.