Former Egyptian President Mohammed Morsi has been buried hours after he collapsed in court and died on Monday.
His lawyer told the AFP news agency the former leader had been buried in eastern Cairo early on Tuesday morning with his family present.
Morsi, who was 67, had been in custody since his removal from office in 2013.
Human rights groups, who had criticised the conditions in which he was kept, have called for an impartial investigation into his death.
His family and activists had repeatedly raised concerns about his health and the amount of time he was kept in solitary confinement, away from visits by lawyers and family.
His son, Abdullah Mohamed Morsi, told Reuters on Monday that Egyptian authorities had denied a family request for a public funeral in his hometown.
A top figure in the now-banned Islamist movement, the Muslim Brotherhood, Morsi became the country’s first democratically elected leader in 2012.
He was ousted and detained in a military coup a year later following mass protests against his rule.
Abdul Fattah al-Sisi, a former army chief, has been in power since 2014.
After Morsi’s removal, the authorities launched a crackdown on his supporters and other dissent, leading to tens of thousands of arrests.
The Muslim Brotherhood and Turkish President Recep Tayyip Erdogan, a close ally of Morsi, are among those who have blamed the Egyptian leadership for Morsi’s death.
What happened in court?
Morsi was appearing in Cairo on Monday on charges of espionage related to suspected contacts with the Palestinian militant Islamist group Hamas.
Officials say he had asked to address the jury, and spoke for about five minutes from a soundproof glass cage where he was being held with other defendants.
Minutes later, he apparently fainted during a break in proceedings.
“He was transferred to a hospital where he was pronounced dead,” a statement by Egypt’s public prosecutor said.
Officials said a forensic report had been ordered into his death, and insisted no new, visible injuries were found on his body.
State television had earlier described the cause of death as a heart attack.
Morsi was already facing decades in jail after being sentenced in three other trials. He had previously been given a death sentence, which was later overturned.
What has the reaction been?
Sarah Leah Whitson, executive director of Human Rights Watch’s Middle East and North Africa division, tweeted that his death was “terrible but entirely predictable”.
BREAKING – #Egypt news says only democratically elected Pres #Morsy has died in prison after stroke. This is terrible but ENTIRELY predictable, given govt failure to allow him adequate medical care, much less family visits. @hrw was just finalizing a report on his health.
“Former President Morsi’s death followed years of government mistreatment, prolonged solitary confinement, inadequate medical care, and deprivation of family visits and access to lawyers,” Ms Whitston said in a later statement.
The group called on the UN to start an investigation into what it described as “ongoing gross violations of human rights in Egypt, including widespread ill-treatment in prisons”.
Amnesty International has also called for an impartial inquiry.
The rights group says Morsi was only allowed three family visits in almost six years of solitary confinement, and was denied access to his lawyers or a doctor.