An Egyptian appeals court has struck down a life sentence and ordered the retrial of ousted Islamist President Mohammed Morsi on charges of conspiring with foreign militant groups, including the Palestinian Hamas.

Tuesday's decision by the Appeals Court in Cairo comes nearly 17 months after the initial sentence against Morsi, who hails from the now-banned Muslim Brotherhood.

Along with Morsi's life sentence, those of 16 others, including the group's spiritual leader Mohammed Badei, were thrown out. The court also overturned death sentences against powerful Brotherhood figure Khairyat el-Shater and 15 others, most of who were tried in absentia.

No new date has been set for the retrial.

Since the 2013 military's ouster of Morsi, he has been in solidarity confinement and has faced several court cases on different charges.