Egypt's government has defended its decision to hand over two Red Sea islands to Saudi Arabia at an appeals court hearing after the move was struck down by a lower court earlier this month.

The transfer of the islands, announced during an April visit by King Salman alongside billions of dollars in Saudi aid, set off the biggest street protests since President Abdel-Fattah el-Sissi was elected two years ago.

The chief government lawyer told the court Sunday that the islands belonged to Saudi Arabia and that it was only a matter of time before Egypt had to hand them back.

Dozens of protesters chanted anti-government slogans in the courthouse. There were also shouting matches and brief scuffles between lawyers and policemen inside the courtroom. The court adjourned until July 3.