Egypt's former President Mohammed Morsi, ousted by the military in 2013 after one year in office, has collapsed in a courtroom and died, officials say.
A top figure in the now-banned Islamist movement Muslim Brotherhood, Morsi had just addressed the court from a cage at a hearing on charges of espionage, the BBC reported.
Morsi, 67, had been in custody since his removal after mass protests.
The Muslim Brotherhood said the death was a "full-fledged murder", and called for crowds to gather at the funeral.
Activists and his family had long complained about his prison conditions, saying Morsi was not receiving treatment for serious health problems, such as high blood pressure and diabetes, and was constantly being held under solitary confinement.
Morsi collapsed moments after addressing the court in Cairo at a hearing related to charges of espionage, emanating from suspected contacts with the Palestinian Islamist group Hamas, which had close ties to the Muslim Brotherhood.
He spoke for five minutes from a soundproof glass cage, which officials said was designed to prevent him disrupting proceedings. The cause of death was not immediately confirmed, but Egypt's public prosecutor said an initial report showed no signs of recent injuries on the body.
Last month, his family said authorities had repeatedly denied access to him, and that they knew little about his health conditions, a situation that "violated constitutions applied all over the world".
In March last year, his youngest son, Abdullah, said officials were "doing this on purpose since they want to see him dead 'from natural causes' as soon as possible".
On Tuesday, Morsi was buried in eastern Cairo, one of his lawyers told AFP.
"He was buried in Medinat Nasr, in eastern Cairo, with his family present. The funeral prayer was said in Tora prison hospital" where he was declared dead on Monday, his lawyer Abdel Moneim Abdel Maksoud said.
(With inputs from IANS, AFP))