|Twice this month, Egypt's highest appeals court has struck down harsh sentences against Mohammed Morsi, the elected Islamist president overthrown by the military in 2013, giving some hope to thousands of his supporters, who were jailed or sentenced to death by hasty verdicts following mass trials.
Mohammed Morsi's Muslim Brotherhood is outlawed as a terrorist group, and the court has upheld heavy sentences against its members. But its quashing of some of the faultiest rulings has led lawyers to see the appeals court as a last refuge for justice.
President Abdel-Fattah el-Sissi and other top officials have long insisted that Egypt's judiciary is independent of the government and does not engage in show trials.
But a series of swift, mass verdicts issued in the tumultuous months after Morsi's ouster, as security forces were cracking down on his supporters and violently dispersing protests, raised the possibility that Egypt might execute the Brotherhood's leadership.
Many judges on the lower courts openly expressed their disdain for the Islamists and their desire to impose order after the turmoil that followed the 2011 uprising. Defense lawyers say they often relied on faulty police reports citing anonymous security sources.
Among the most notorious rulings were those by a court in the southern city of Minya, which sentenced more than 1,000 alleged Morsi supporters to death in two mass trials that each lasted only a few days. Some of those death sentences were later rescinded by a religious authority, and many of the defendants appealed the rulings and were granted retrials. None were executed.
Scores of other cases were reversed by the Court of Cassation, whose members are appointed by the Supreme Judicial Council, a panel of the country's most experienced and well-respected judges.
Rights lawyers see it as a refuge for those who have been tried, convicted and condemned by the lower courts, as well as public opinion.