Former Egyptian president Mohamed Morsi has been buried alongside other senior figures of the Muslim Brotherhood in Cairo, his son says.
The burial was attended by members of the family in Cairo's Nasr City after authorities refused burial in Morsi's home province of Sharqiya in the Nile Delta, Ahmed Morsi said.
"We washed his noble body at Tora prison hospital, read prayers for him at the prison hospital ... and the burial was at the Muslim Brotherhood spiritual guides," Ahmed wrote on his Facebook page.
Morsi died on Monday (Egypt time) from a heart attack after collapsing in a Cairo court while on trial on espionage charges, authorities and a medical source said. He was 67.
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.
A top figure in the now-banned Islamist movement, the Muslim Brotherhood, Morsi became the country's first democratically elected leader in 2012.
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 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.
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".
"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.
The Muslim Brotherhood's political arm, the Freedom and Justice party, described Morsi's death as an "assassination".
Turkish President Erdogan blamed Egypt's "tyrants" for his death and described him as a martyr.
The emir of Qatar, Sheikh Tamim bin Hamad Al Thani, another ally of the late leader, expressed his "deep sorrow" at the death.
British MP Crispin Blunt, who led a panel of politicians who warned in 2018 about the conditions of Morsi's confinement, has called for a "reputable independent international investigation".
Who was Morsi?
Born in the village of El-Adwah in 1951, Morsi studied engineering at Cairo University in the 1970s before moving to the US to complete a PhD.
He was chosen as the Muslim Brotherhood's presidential candidate for the 2012 election after the movement's preferred choice was forced to pull out. During his turbulent year in office, Morsi was accused of mounting an Islamist coup and mishandling the economy.
Public opposition to his government grew and millions of anti-government protesters took to the streets across Egypt to mark the first anniversary of the day he took office, on 30 June 2013.
Three days later, the army suspended the constitution, announced an interim government ahead of new elections and detained Morsi, who denounced the move as a coup.
Then army chief Mr Sisi was elected president in 2014 and re-elected last year in polls rights groups called "farcical".
Hundreds of people have been killed and tens of thousands of others detained in the subsequent crackdown.
- Reuters / BBC