An Egyptian court ordered the release from detention of human rights lawyer Malek Adly on Thursday while being investigated on a number of charges, including inciting protests.
Later on Thursday, the prosecution appealed the court decision, his lawyer Khaled Ali said, blocking his release.
A criminal court will rule on the prosecution's appeal next Saturday.
The well-known lawyer, who was arrested on 6 May, is accused of inciting violations of the protest law by calling for demonstrations against the 8 April Egyptian-Saudi border demarcation agreement concerning the Red Sea islands of Tiran and Sanafir.
Adly is also accused of destabilising security, trying to destabilise the country and planning to overthrow the regime. He has denied all charges .
Last month, the Egyptian Lawyers Syndicate filed an official demand calling on authorities to allow the detained lawyer out of solitary confinement where he has been held since his arrest in May.
According to Adly's wife, Asmaa Ali, his health had deteriorated rapidly because of the conditions of his detention.
Protesting without a police permit is a crime in Egypt, and violators are often sentenced to jail terms.