Former Egyptian President Mohammed Morsi died shortly after a court appearance on Monday, according to state-run media.
The ousted leader was attending a hearing for his trial in an espionage lawsuit when he collapsed. State TV reports Morsi died before he could be taken to a hospital.
Morsi had been serving prison sentences for various crimes related to the detention and deaths of protesters, and was also charged with espionage, jailbreak and insulting the judiciary.
He became Egypt's first democratically elected president in 2012 after longtime leader Hosni Mubarak was ousted as part of the Arab Spring uprising movement.
A year later, Morsi was overthrown by the military following mass anti-government protests. He and other leaders from the now-banned Islamist group Muslim Brotherhood were arrested and jailed.
While in office, Morsi was criticized for not doing enough to help the country's economy and accused of corruption.
Independent reports from Human Rights Watch and British lawmakers said Morsi's imprisonment conditions were contributing to his deteriorating health in recent years.