Cairo(ANN)- Former President Mohamed Morsi died on Monday in court after the conclusion of a trial session in the espionage lawsuit.

According to Egyptian State Television, Morsi suffered a heart attack following the court hearing and his body has been transferred to a hospital in preparation for burial arrangements.

Morsi, aged 67, died after a court session in his espionage trial ended.

READ: Ex-Egypt President Morsi spending 7th Ramadan in jail

The ousted Morsi asked to speak at the session, and the judge gave him permission.

He then reportedly fainted in court and was later pronounced dead.

Morsi was elected in democratic elections in 2012 after the 2011 revolution ousted dictator Hosni Mubarak. He was overthrown in a coup by the Egyptian military, who installed current President Abdel Al-Sisi as the leader.