FILE - In this Thursday, March 4, 2010 file photo, Egyptian President Hosni Mubarak addresses the media after a meeting with German Chancellor Angela Merkel, not pictured, at the chancellery in Berlin, Germany. Officials say an Egyptian court has ordered the release of ex-President Mubarak, but it's not immediately clear whether the prosecutors will appeal the order. AP Photo/Markus Schreiber, File In this Thursday, June 13, 2013 photo, Egyptian Muslim Brotherhood cleric Safwat Hegazy attends a press conference with Muslim scholars, not pictured, in support of Syria, in Cairo, Egypt. On Wednesday, Aug. 21, 2013, Hegazy, a fiery preacher from the ultraconservative Salafi movement and a top Brotherhood ally, was captured at a checkpoint near the Siwa Oasis in eastern Egypt and close to the border with Libya, according to the state-run MENA news agency. CAIRO (AP) - A court ordered the release of Hosni Mubarak and prosecutors said they're unlikely to appeal, raising the possibility Egypt's deposed autocrat could walk free after more than two years in detention. Wednesday's decision threatened to stoke tensions in the deeply divided nation, widen the circle of anger against the military-backed government and amplify Islamist allegations that last month's military coup was a step toward restoring the old regime. Even if he is released after more than two years in detention, the 85-year-old former president is still on trial on separate charges that could put him back behind bars. Meanwhile, the prospect of Mubarak freed, even if only temporarily, would feed into the larger crisis bedeviling Egypt: the violent fallout from the July 3 coup that unseated Mohammed Morsi, an Islamist who became Egypt's first freely elected president following Mubarak's ouster. Mubarak's release "will cause chaos," said human rights lawyer Nasser Amin. It will be used by Islamists as proof of the return of the old regime...and can lead to new alliances between revolutionary groups and political Islam. The three judges convened in Tora prison, where Mubarak has been held for most of his detention since April 2011, and their decision was transmitted to official Egyptian media. But even before they ruled, human rights advocates were arguing for a new system of justice to make up for shoddy prosecution and a judiciary divided between loyalists of the old regime, Islamists and independents. A prosecution official, speaking on condition of anonymity, said the decision would not be appealed. A senior prison official, Mostafa Baz, told the private CBC TV station that his office will ask the prosecutors on Thursday whether Mubarak is wanted in other cases, and if not, he would be freed. The possibility of Mubarak's release came in the midst of the post-coup crackdown that has left more than 1,000 people dead and hundreds in detention. The pro-Islamist camp was waning as its leadership and Morsi himself were arrested. Other serious blows this week were three high-level arrests: of the supreme leader and spiritual guide of Morsi's Muslim Brotherhood, of a cleric instrumental in fomenting street protest against the coup, and of a senior Brotherhood spokesman. On the streets of Cairo, random interviews about Mubarak highlighted the deep polarization in Egypt, which doesn't always clearly follow the fault lines of pro-Morsi or pro-military. "This is an absurd charade by the judiciary, the army, the police in order to reinstate Mubarak and his corrupt regime and to rob the people of their revolution," said Ibrahim Mohammed, a man in his 30s who said he wasn't a Morsi supporter. Another Cairo resident, Ahmad Kamal, said it was time Mubarak was set free. He should have been released a long time ago. God forgive them for what they have done and the judiciary has ordered this so that should be enough. I have complete faith in the Egyptian judiciary," Kamal said. Since his overthrow in February 2011, Mubarak has been on a roller coaster ride through the courts during which he has been convicted, only for another court to overturn the ruling, grant him a retrial and order him released. Still, he was kept behind bars pending retrial and on other charges. For his first trial, on charges of corruption and conspiracy in the deadly shooting of nearly 900 protesters during the uprising against him, he was on a gurney behind prison cage bars and denied the charges. The first Arab leader to face trial by his own people, he was convicted and sentenced to life in prison. Last January he was interrogated about gifts he allegedly received from Al-Ahram, the country's flagship state-owned newspaper, and agreed to refund it $3 million. And in the same month a court overturned his life sentence on the grounds that the prosecution lacked concrete evidence and failed to prove the protesters were killed by the police. In April an investigation began into allegations Mubarak and his family embezzled state funds designated for the maintenance and upkeep of presidential palaces. And on April 13 he was back on trial for alleged complicity in the killing of protesters in the last days of his rule. That trial, the one that could put him back in prison, resumes on Aug. 25. Since his detention, Mubarak has repeatedly been hospitalized. As president his health was a state secret. Since his ouster, Mubarak's supporters have released conflicting details, including that he suffered a stroke, a heart attack and at times went into a coma. His critics called these an attempt to gain public sympathy and court leniency. Lawyer Ahmed Ragheb, who was part of a commission appointed by Morsi to find new evidence for the trial of Mubarak and associates, said the decision to release Mubarak was no surprise. He said the prosecution was poor and the evidence was collected by police who were largely loyal to Mubarak and his security chiefs. "This goes to show that the main problem (of prosecuting Mubarak) is in the judiciary...and the failure to institute a transitional justice process," he said. The judiciary, including the prosecution, the police and the courts, go back to the Mubarak era.