An Egyptian judge renewed on Monday the detention for 15 days of 25 people arrested while demonstrating against the recent Egyptian-Saudi accord which acknowledges Saudi Arabia's sovereignty over two Red Sea islands, defence team lawyer Amr Imam told Ahram Online.
Prosecutors on Saturday reversed an earlier decision to free the protesters, who were arrested on Friday, and ordered they be detained pending investigations.
The protesters were arrested at a rally in downtown Cairo against the recent Egyptian-Saudi maritime border redrawing agreement which places the islands of Tiran and Sanafir in Saudi regional waters.
Parliament has not yet voted on the agreement.
The rally marked one of the largest demonstrations in recent months.
The detained protesters face charges including protesting without a permit as well as disrupting traffic and "threatening security."
A controversial 2013 law bans all but police-sanctioned demonstrations, with violators facing jail and fines.
Imam says the decision to detain this group is "purely political" and aims at "intimidating people" who plan further demonstrations later this monthagainst the controversial deal.
Dozens of demonstrators protested Monday afternoon before the court in central Cairo where the session was held, chanting slogans including "freedom, bread...the islands are Egyptians."
Several political figures and rights advocates were also present at the Abdeen court to show solidarity with the detainees, including Constitution Party leader Khaled Dawood, National Council for Human Rights member Ragia Omran, and rights lawyer Tarek El-Awady.
A number of political parties and public figures signed a statement late on Sunday calling for the release of the detainees, and questioning if the security apparatus had played a role in the change of course on the release matter.
Another 15 people were ordered to be detained for 15 days in Alexandria over demonstrations in the coastal city against the islands accord, lawyers said.
The announcement has sparked public outcry, with some critics accusing President Abdel-Fattah El-Sisi of "selling" the islands.
Egyptian and Saudi officials say the islands belong to the Gulf kingdom and were only under Egyptian control because Riyadh had asked Cairo in 1950 to protect them.