An Egyptian rights lawyer who had been held in solitary confinement for over 100 days after defying President Abdel-Fattah el-Sissi was released from jail Sunday on a court order.

Malek Adly, who was incarcerated on a rolling series of administrative detention orders, was freed after a court rejected an appeal by prosecutors a day earlier that had attempted to hold him longer over accusations that included attempting to overthrow the government.

"We don't know what will happen next — the case is still open and they could try to detain him again," said Adly's lawyer, Mahmoud Belal. "What's important though is that he is out."

Adly's supporters say authorities targeted him over a televised interview in which he objected to el-Sissi's decision in April to hand over two Red Sea islands to Saudi Arabia, implying that such a move was traitorous.

Along with other lawyers, Adly raised a court case against the handover, arguing that the islands were historically Egypt's, as opposed to the government's position that they had always been Saudi territory and were only placed under temporary Egyptian protection.

About two months after Adly was jailed, an Egyptian court backed his legal suit with a June 21 ruling ordering the island transfer canceled. The government has appealed, and the matter now awaits discussion by a new panel of judges.