Cairo: An Egyptian appeals court overturned on Wednesday death sentences for 149 pro-Islamists accused of killing policemen in a mob attack on their station, a judicial source said.

The court ordered a retrial for the defendants over the attack, which killed 13 policemen near Cairo on August 14, 2013, the day police shot dead hundreds of Islamist demonstrators in the capital.

The initial ruling in February 2015 came amid a series of death sentences in mass trials that were criticised internationally, as the government cracked down on supporters of ousted Islamist president Mohammad Mursi.

The court had also sentenced 37 people to death in absentia, but they would have to hand themselves in for a retrial.

The grounds for the appeals court ruling were not immediately available, but the court has overturned hundreds of death sentences over the past year, to the relief of rights advocates and frustration of some in the government who have urged fast track executions.

Seven people have been executed for political violence since Mursi’s ouster, including six who were convicted of belonging to an Islamist militant group.

The military overthrow of Mursi, the country’s first freely elected president, ushered in the worst domestic bloodshed in the country’s modern history.

Mursi ruled for only a year, deeply dividing the country, and his removal was met with escalating protests by Islamists that police dispersed with live ammunition.

On August 14, 2013, less than two months after his overthrow, police broke up two protest camps in Cairo, killing about 700 protesters.

Mursi’s supporters around the country attacked police stations, killing dozens of officers, and torched the churches of Coptic Christians.

Mursi himself is facing several trials and has already been sentenced to death in one case.

Several leaders of his Islamist Muslim Brotherhood movement, including its chief Mohammad Badie, have been sentenced to either death or lengthy jail terms.

The movement has been blacklisted as a “terrorist organisation” and its assets confiscated.

The police crackdown that initially targeted Mursi supporters was later widened to include secularist and leftist leaders and activists.