Morsi had just finished addressing the court
Mohamed Morsi won a vote for the Egyptian presidency in 2012 but was overthrown in a military coup a year later and has been imprisoned since.
He was in court today on espionage charges but collapsed and died on the scene.
From the Associated Press:
"The 67-year-old Morsi had just addressed the court, speaking from the glass cage he is kept in during sessions and warning that he had "many secrets" he could reveal, a judicial official said. A few minutes afterward, he collapsed, the official said, speaking on condition of anonymity because he was not authorized to talk to the press.
Morsi's family had complained about his detention, saying his health was deteriorating and that he had been denied medical treatment.