Cairo: Egypt’s top appeals court Saturday revoked death and life sentences against more than 500 backers of deposed Islamist president Mohammad Mursi and ordered a retrial for them in a case that has raised international concerns over the operation of the justice system in the country.

The Court of Cassation delivered the ruling at a hearing in which prosecution and defence lawyers alike demanded the cancellation of the verdicts delivered by a lower court last year, citing legal flaws.

In April, the Criminal Court in the southern Egyptian city of Minya sentenced 37 Islamists to death and 491 co-defendants to life after convicting them of killing a senior security officials and torching a police station and other state institutions in the city amid the unrest that followed the mid-2013 dispersal of two pro-Mursi camps in Cairo that left hundreds dead.

On Saturday, lawyer Mohammad Toson argued in a brief hearing that the Criminal Court issued the rulings without listening defence lawyers and witnesses. No date has been set yet for the start of the retrial.

Most defendants in the case were tried in absentia. At the time, the United Nations condemned the verdicts, saying they breached international law and were “rife with procedural irregularities”. The rulings also triggered an outcry among rights advocates.

The Egyptian government has repeatedly said the country’s judiciary operates independently.

Thousands of leaders and followers in Mursi’s Muslim Brotherhood have been detained allegedly for inciting or involvement in violence since the Islamist president was deposed by the army in 2013 following enormous street protest against his rule. The clampdown is the toughest against the 87-year-old Islamist group, which has condemned trials of its members as a sham.