CAIRO (Reuters) - Egypt's Court of Urgent Matters has ordered the suspension of an earlier court ruling that annulled a deal to hand over two Red Sea islands to Saudi Arabia, judicial sources said on Thursday.

Egypt announced in April a maritime border accord with Saudi Arabia, which could see it lose control of two Red Sea islands. The accord caused a public uproar and rare protests by Egyptians, many of whom said they were taught at school that Tiran and Sanafir were Egyptian.

An administrative court voided the accord in June after a lawsuit was filed against it, saying Egyptian sovereignty over the islands held and could not be given up.

Egyptian authorities lodged a formal appeal with the Higher Administrative Court, part of the Council of State, a high-level judicial body that gives legal advice to the government, drafts laws and oversees legal cases involving public entities.

That appeal is still pending.

The Court of Urgent Matters ruled on Thursday on a separate appeal filed by Ashraf Farahat, a lawyer. But legal experts dismissed that court's ruling, saying it was not qualified to pronounce on matters related to public administration.

"This verdict is unconstitutional and void. If the government were to refer the treaty to parliament for ratification based on this verdict then it is announcing to everyone that it does not care about the constitution," constitutional expert Mohamed Nour Farahat said.

The Court of Urgent Matters' original brief was to tackle cases that needed quick resolution but risked getting bogged down for long periods in the regular court system.

But since the 2011 uprising that ended Hosni Mubarak's 30-year rule, the court has taken on a more prominent role, ruling on cases involving bans or restrictions of political parties and other such sensitive matters.

Tiran and Sanafir islands are situated between Saudi Arabia and Egypt's Sinai Peninsula in the narrow entrance to the Gulf of Aqaba leading to Jordan and Israel.

Saudi and Egyptian officials say they belong to the kingdom and were only under Egyptian control because Riyadh asked Cairo in 1950 to protect them. Ali said Cairo's sovereignty over the islands dated to a 1906 treaty, before Saudi Arabia was founded.

The maritime border accord was announced during a visit to Cairo by the Saudi king that coincided with the signing of aid deals, and this created the impression among many that the islands were sold. Egyptian authorities denied this.

"The (Court of Urgent Matters) has usurped the authority of the Council of State," said Khaled Ali, a lawyer who filed the June lawsuit to annul the maritime deal. He said he would announce legal steps to block the new decision on Saturday.

(Reporting by Haitham Ahmed, Ahmed Aboulenein and Lin Noueihed; writing by Asma Alsharif; editing by Mark Heinrich)