A Cairo court sentenced ousted president Mohamed Morsi to death Saturday on charges of conspiring with foreign militants to break out of prison during Egypt’s uprising four years ago.

The verdict, which can be appealed, marks a stunning blow to the pro-democracy revolt that saw thousands of Egyptians rise up against an increasingly corrupt police state.

Security forces had arrested Morsi, a member of the Muslim Brotherhood, during the 18-day rebellion in 2011, and he escaped from prison several days later. He was then elected president in the country’s first free and fair democratic elections in 2012, before Egypt’s military ousted the Islamist leader in a dramatic coup a year later.

Saturday’s verdict appeared to criminalize the events of the 2011 uprising against the regime of Hosni Mubarak, alleging that Morsi and fellow Islamists conspired with Hamas and Hezbollah operatives to escape incarceration and stage a violent revolt against the state.

Egyptian security forces stand guard outside the police academy during the trial of Egypt's deposed Islamist president Mohamed Morsi Saturday. (Khaled Desouki/AFP/Getty Images)

More than 100 other defendants, most of whom were tried in absentia, were also sentenced to death on the same charges. In a separate case, 16 defendants were given the death penalty for allegedly leaking state secrets to Iran while Morsi was in power. The presiding judge did not sentence Morsi in that case, postponing a final verdict until next month.

“Today will be remembered as one of the darkest days” in Egypt’s history, Amr Darrag, a senior Brotherhood official and former member of Morsi’s cabinet, said in an e-mail Saturday. Darrag is living in exile in Turkey.

Saturday’s judgment was based on “lies, hearsay and paranoid conspiracy theories,” the statement said. It is “another deeply disturbing attempt to permanently erase democracy” in Egypt, Darrag said.

In recent months, Egyptian courts have sentenced hundreds of people to death in a series of mass hearings that rights groups have said defy international standards for fair trials. Only one Islamist defendant — who was recorded throwing young, anti-Morsi protesters from the top of a building in 2013 — has been hanged. Tens of thousands have been imprisoned.

Morsi’s death sentence marks a stunning turnaround for the Islamist leader and Brotherhood group from which he hails. The movement secured a majority in Egypt’s parliament in 2012, and Morsi’s presidency had offered hope that the country could break the military’s decades-long hold on the executive branch.

But Morsi proved to be an impotent leader, granting himself sweeping powers but failing to bring state institutions under his control. When massive crowds took to the streets to demand Morsi’s resignation in June 2013, Egypt’s defense minister and current president, Abdel Fatah al-Sissi, ordered his arrest.

Sissi then presided over a widespread crackdown on the Muslim Brotherhood and other dissidents who opposed his rule.

Egyptian judge Shaban el-Shamy, center, reads out the verdict sentencing deposed Islamist president Mohamed Morsi and more than 100 other defendants to death at the police academy in Cairo. (Khaled Desouki/AFP/Getty Images)

Last month, another Egyptian court sentenced Morsi to 20 years in prison for inciting violence against protesters of his regime in 2012.

Saturday’s ruling found Morsi guilty of a supposed grand conspiracy that included working with Iranian operatives, Hamas militants from Gaza and Lebanon’s Hezbollah movement to collapse the Egyptian state and propel the Muslim Brotherhood to power.

The indictment alleged that Muslim Brotherhood operatives were trained by Hezbollah and Iran inside Gaza, and later used their expertise to stage the prison break north of Cairo. Morsi and his co-defendants were also accused of “looting poultry and livestock” from prison grounds. Thousands of prisoners around the country escaped during the uprising four years ago, after Egyptian security forces withdrew from the streets in the face of a popular revolt.

Because the court’s proceedings were closed to the news media, it is unclear what evidence prosecutors presented to prove such a conspiracy. Included on a list of defendants were several Hamas operatives who had been jailed in Israel or were dead at the time.

Only 27 defendants appeared in court Saturday. Morsi arrived smiling and wearing a blue prison uniform.

As the verdict was read, Morsi and his co-defendants chanted against the military.

Heba Habib contributed to this report.