Egypt’s former President Mohammed Morsi died on Monday, AFP reported quoting the state media. He was 67.

Morsi reportedly fainted after a court session and died. “The body has been transferred to a hospital and necessary procedures are under way,” the BBC reported quoting a local television channel.

Morsi was facing espionage charges. He was ousted by the army in 2013, a year after he took office as the country’s first democratically-elected leader.

Morsi had remained in custody ever since he was ousted. In 2018, an independent detention review panel of three British parliamentarians alleged that Morsi was being tortured, reported The Guardian. They said he was being kept in solitary confinement with just one hour allowed for exercise. The team also found that Morsi, who had a history of diabetes, liver and kidney diseases, was not receiving the required medical care.