An Egyptian court has pronounced death sentences on ousted president Mohammed Morsi and more than 100 other people over a mass prison break in 2011.
Morsi is already serving a 20-year prison term for ordering the arrest and torture of protesters while in power.
Egypt's religious authorities will now have to give their opinion before the sentence can be carried out.
Morsi's supporters from his Muslim Brotherhood movement have described the charges against him as "farcical".
He was deposed by the military in July 2013 following mass street protests against his rule.
Since then, the authorities have banned the Muslim Brotherhood and arrested thousands of his supporters.
In a separate case on Saturday, an Egyptian court banned hardcore football fan clubs known as the Ultras, who played a leading role in protests during the 2011 uprising against then-president Hosni Mubarak.
At the scene: Sally Nabil, BBC Arabic, Cairo
Inside the dock, Morsi and members of his Muslim Brotherhood group chanted, "Down with military rule!" after the judge read out his ruling against him.
The judge's request for the death sentence in connection with the jailbreak case was referred to the grand mufti, a high religious cleric, for ratification.
However, the mufti's recommendation is not binding. Even if he advises against the death sentence, the judge can still go ahead with it.
The Brotherhood issued a statement condemning the sentence and called for an escalation of protests.
But the tight security grip in Egypt means that it is highly unlikely to see mass demonstrations.
Hundreds of Brotherhood supporters are already behind bars, while others are keeping a low profile for fear of a crackdown.
Morsi raised both fists in defiance as the sentences were given.
Morsi, who escaped from Wadi Natroun prison in January 2011, was accused of colluding with foreign militants in a plot to free Islamists during the mass prison breaks.
Many of his 104 co-defendants were Palestinians accused of being members of militant group Hamas, and were charged in absentia.
The court also issued rulings on another case, sentencing 16 Muslim Brotherhood members, including deputy leader Khairat al-Shater, to death on spying charges.
Morsi, who also faces espionage charges, will be issued a verdict in that case at a later date.
Hundreds of people have been sentenced to death in a crackdown on the Brotherhood following Morsi's removal in 2013.
However, it is thought that only one such death sentence has been carried out so far.
All death sentences must first be sent to the grand mufti, Egypt's highest religious authority, for his non-binding opinion on whether they should stand.
Convictions are still open to appeal, even if the grand mufti gives his approval.
Morsi's supporters have condemned the cases against him as a political show trial.
Amr Darrag, a former minister in Morsi's government, described Saturday as "one of the darkest days" in Egypt's history.
"These latest charges are another deeply disturbing attempt to permanently erase democracy and the democratic process in Egypt," he said in a statement.
The death sentence was also condemned by Amnesty International, which said it had become a tool "to purge the political opposition", and Turkish President Recep Tayyip Erdogan, who likened it to a return to "ancient Egypt".
Morsi was Egypt's first freely elected president, but protests began building less than a year into his rule when he issued a decree granting himself far-reaching powers.
The armed forces, led by then-military chief Abdul Fattah al-Sisi, ousted Morsi in July 2013.
In May 2014, Mr Sisi became president after securing a landslide victory in presidential elections with a turnout of 46%.