Egypt's highest appeal court has overturned a life sentence handed down to ousted President Mohammed Morsi.
The Court of Cassation ordered that the 65-year-old be retried on the charge of conspiring to commit terrorist acts with foreign organisations.
Last week, the court quashed a death sentence handed to Morsi in a separate case revolving around a mass prison break during the 2011 revolution.
But he is still serving lengthy sentences related to two other cases.
Morsi became Egypt's first democratically elected president in 2012, but he was removed by the military a year later after mass protests against his rule.
Since then, the authorities have launched a crackdown on Morsi's now-banned Islamist movement, the Muslim Brotherhood, which has seen hundreds of people killed in clashes with security forces and tens of thousands imprisoned.
In May 2015, Morsi and three other senior Brotherhood leaders - general guide Mohammed Badie, former parliamentary speaker Saad al-Katatni and Essam al-Erian - were sentenced to life in prison for conspiring to commit terrorist acts with foreign organisations to undermine national security.
Sixteen other people, including senior Brotherhood officials Khairat al-Shater and Mohammed al-Beltagi, were sentenced to death in the case.
Prosecutors alleged that the Brotherhood had hatched a plan in 2005 to send "elements" to military camps run by the Palestinian Sunni Islamist group Hamas in the Gaza Strip, the Shia Islamist Hezbollah movement in Lebanon, and the Revolutionary Guards force in Iran.
The Brotherhood, which the government declared a terrorist group in 2013, denies the charge. It says it is committed to peaceful activism.
On Tuesday, the state-owned Al-Ahram newspaper reported that the Court of Cassation had overturned the life sentences imposed on Morsi and his fellow Brotherhood leaders, and also cancelled the 16 death sentences.
Morsi's lawyer, Abdel Moneim Abdel Maksoud, confirmed the ruling, telling the AFP news agency: "The verdict was full of legal flaws."
In June, Morsi was sentenced to 40 years in prison after being convicted of leaking state secrets and sensitive documents to Qatar.
He has also been sentenced to 20 years for ordering the unlawful detention and torture of opposition protesters during clashes with Brotherhood supporters outside a presidential palace in Cairo in December 2012.
Morsi's supporters have said the trials are attempts to give legal cover to a coup. They insist they are based on unreliable witnesses and scant evidence.