Mohamed Morsi
Ousted Egyptian President Mohamed Mursi is seen behind bars during his trial at a court in Cairo May 8, 2014.Reuters

Ousted former Egyptian president Mohamed Morsi was sentenced to life imprisonment on Tuesday in a case related to charges of spying for Hamas.

The court also sentenced 17 defendants to life in prison, and 16 to death, including Muslim Brotherhood leaders Khairat El-Beltagy and Mohamed El-Beltagy, Al Ahram reported.

The general guide of the Muslim Brotherhood, Mohamed Badie, was also sentenced to 25 years in jail in the same case.

According to Egypt's penal code, life sentences are for 25 years.

In the espionage case, prosecutors charged Morsi and 35 other defendants with conspiring with foreign powers -- including Hamas, Lebanon's Hezbollah and Iran's Revolutionary Guards -- to destabilise Egypt.

On May 16, the verdicts were referred to the Grand Mufti, the country's highest Islamic official who gives the religious judgment of all preliminary death sentences, for his opinion.

Presiding Judge Shabaan al-Shami said the Mufti's report agrees with the judges' panel opinion.

The court is also expected to deliver its final verdict in Morsi's jailbreak case later in the day.

Egyptian authorities have banned Morsi's Muslim Brotherhood since his overthrow and arrested thousands of his supporters.

In April, a court sentenced Morsi and 12 other defendants to 20 years in prison for ordering the arrest and torture of protesters in clashes outside the presidential palace in December 2012.