Mohamed Morsi, the former president of Egypt who was ousted by the military in 2013, collapsed and died in a Cairo courtroom on Monday. The leader of the now-banned Islamist party the Muslim Brotherhood was in court for a hearing on espionage charges when he died at the age of 67.

"He was speaking before the judge for 20 minutes then became very animated and fainted. He was quickly rushed to the hospital where he later died," Egyptian state television reported

After the Arab Spring uprising in 2011, Egypt's autocratic ruler Hosni Mubarak was ousted and a democratic transition in the most populous country in the Middle East was thought to be imminent. The first democratically elected president of Egypt, Morsi served initially as a symbolic figure within the new era in Egyptian politics. 

However, one year after he won the presidential election in 2012, he was ousted by the military given the political instability that plagued his tenure. As noted by the New York TimesMorsi governed "clumsily," maintained a fraught relationship with the military establishment, and failed to contain the popular protest in Tahrir Square in 2013. These conditions provided the military with an excuse to take over. 

Gen. Abdel Fattah el-Sisi succeeded him, and under the new military government imprisoned the former president and charged him with various crimes. Monday's hearing on espionage charges stemmed from allegations that Morsi had spied on behalf of the Palestinian Islamist organization Hamas, according to The Guardian

In addition to charging the former president, the new military government outlawed the Muslim Brotherhood and classified the 90-year-old Islamist movement as a terrorist organization. 

Morsi suffered from various health issues, including diabetes as well as liver and kidney disease. His condition worsened while he was imprisoned, given the medical neglect and poor conditions in jail. Last year, three U.K. parliamentarians released a research report on Morsi's detention conditions. Their findings showed that Morsi was not being provided the medical attention necessary to address his health issues, which at the time they said could result in his "premature death."

Also Watch