An Egyptian court sentenced former president Mohamed Morsi to 20 years in prison Tuesday, handing down the first verdict against him since the military ousted him in July 2013.

The court found Morsi and 14 other members of the Muslim Brotherhood guilty of inciting violence against protesters who had staged a sit-in outside the presidential palace in 2012, when Morsi was still in power.

Morsi and the other defendants, including senior Brotherhood leaders Essam el-Erian and Mohamed Beltagy, were acquitted of a charge of premeditated murder, which carries the death sentence. The verdict was broadcast live on state television after months of hearings that were closed to the news media.

The defendants were placed in a soundproof glass enclosure inside a makeshift courtroom at Egypt’s national police academy.

In an e-mailed statement from Istanbul, exiled Brotherhood leader Amr Darrag called the verdict “a travesty of justice” and “entirely unsupported by evidence.” Egypt’s government outlawed the Muslim Brotherhood, deeming it a terrorist group, in the months after deposing Morsi.

The rights group Amnesty International said it had documented numerous irregularities in the trial, and it called for the convictions to be overturned. The verdict can be appealed.

“This verdict shatters any remaining illusion of independence and impartiality in Egypt’s criminal justice system,” said Hassiba Hadj Sahraoui, Amnesty’s deputy director for the Middle East and North Africa.

Prosecutors had accused Morsi supporters of beating, detaining and torturing demonstrators staging a peaceful sit-in outside Cairo’s Ittihadiya presidential palace in December 2012. The evidence included testimony from alleged torture victims and forensic reports detailing injuries, state media said.

The melee kicked off two nights of clashes between pro- and anti-Morsi crowds, and at least 10 people, including Morsi supporters, were killed.

The 2012 demonstration had been held in opposition to Morsi’s tightening grip on power just five months into his presidency, after he declared his decisions immune from judicial review in order to push through a constitution drafted by the Brotherhood — the main Islamist group that opposed the autocratic rule of Hosni Mubarak, who was forced from power in 2011 by a popular uprising.

Mass protests against Morsi in June 2013 enabled Egypt’s military — suspected by Morsi and the Brotherhood to be aligned with Mubarak — to intervene and topple the Islamist leader.

Morsi was arrested July 3, 2013, and held incommunicado until his appearance at a court hearing four months later.

Abdel Fatah al-Sissi, who was Morsi’s defense minister, spearheaded the coup and was later elected president. Last November, a Cairo court dropped a case against Mubarak for his alleged role in ordering police to fire on demonstrators during the 2011 uprising.

Morsi is being detained at a maximum-security prison near Egypt’s second-largest city, Alexandria. He still faces charges of espionage and is under indictment for allegedly breaking out of prison during the 2011 revolt. Both crimes are punishable by death.

Egyptian judges have issued hundreds of death sentences against alleged Brotherhood supporters in mass trials that rights groups say violate international standards and have discredited the country’s judiciary.

Authorities have also jailed journalists and liberal and secular activists as part of a broad crackdown on dissent.

Heba Habib contributed to this report.

Read more:

The politics of restoring U.S. military aid to Egypt

The cycle of protests and crackdowns in Egypt