A top Egyptian court on Monday rejected a plan to transfer two uninhabited Red Sea islands, Tiran and Sanafir, to Saudi Arabia in a deal that provoked outrage among Egyptians.

The Egyptian government had appealed against a lower court ruling in June that found the controversial border demarcation agreement was illegal.

But the courtroom erupted in cheers as the judge delivered the final verdict on the issue.

Lawyers and activists can be seen chanting outside the Egyptian Council of state: "Bread, freedom, these islands are Egyptian."