Egypt's Qasr El-Nil prosecution ordered on Sunday the four-day detention pending investigation of 25 protesters, reversing an earlier release order for the suspects who were arrested at a protest against Egypt's recent agreement to give Saudi Arabia two Red Sea islands.
Around 80 protesters were arrested at the so-called "Land Friday" demonstrations in Cairo, human rights groups report.
The suspects are accused of participating in a protest that "threatens public safety," blocking roadways and disrupting traffic.
Lawyers for the defendants say they discovered that the release order was cancelled late Saturday as they were following up on procedures to free the 25 protesters, lawyer Mohamed Abdel-Aziz said on his Facebook page.
Calls for protest were made online after Egypt announced it was giving Saudi Arabia the islands of Tiran and Sanafir, which the government says are rightfully Saudi. Many Egyptians, however, insist the islands belong to Egypt and view the deal as a violation of the country's sovereignty.
Thousands participated in the downtown Cairo protest, the country's largest in recent years, which security forces dispersed with teargas.
More protests over the island issue are planned for 25 April, which marks the complete withdrawal of Israeli forces from Sinai in 1982.