CAIRO -- Egypt's first democratically elected president, Islamist leader Mohammed Morsi, was buried under heavy security early on Tuesday, a day after his dramatic collapse and death inside a Cairo courtroom, a member of his defense team said.
Morsi's family attended funeral prayers in the mosque of Cairo's Tora prison, followed by the burial at a cemetery in the city's western district of Nasr City, said Abdul-Moneim Abdel-Maqsoud, a member of Morsi's defense team.
Morsi, 67, hailed from Egypt's largest Islamist group, the now outlawed Muslim Brotherhood, and was elected president in 2012 in the country's first free elections following the ouster the year before of longtime leader Hosni Mubarak.
The military toppled Morsi in 2013 after massive protests and crushed the Brotherhood in a major crackdown, arresting Morsi and many others of the group's leaders.
During his years in prison, Morsi, who was known to have diabetes, was often held in solitary confinement and was largely barred from receiving visitors. His family was only allowed to visit three times. While in detention, Morsi continued to appear in court on a range of charges.
In early court sessions he gave angry speeches until judges ordered him kept in a glass cage where they could turn off his audio.
Morsi's Brotherhood on Monday accused the government of "assassinating" him through years of poor prison conditions. The group demanded an international investigation into Morsi's death and called on Egyptians to protest outside Egyptian embassies across the world.
Late Monday, Egypt's chief prosecutor said Morsi's body would be examined to determine the cause of his death. State TV, citing an unnamed medical source, said he died after suffering a heart attack.
Morsi collapsed Monday just after he had addressed the court, speaking from inside the glass cage and warning that he had "many secrets" he could reveal, a judicial official said.
In his final comments, he continued to insist he was Egypt's legitimate president, demanding a special tribunal, one of his defense lawyers, Kamel Madour told The Associated Press. State TV said Morsi died before he could be taken to hospital.
It was a dramatic end for a figure central in the twists and turns taken by Egypt since its "revolution" -- from the pro-democracy uprising that in 2011 ousted the country's longtime authoritarian leader, Hosni Mubarak, through controversial Islamist rule and now back to a tight grip under the domination of military men.
The Brotherhood won the elections held after Mubarak's fall, considered the first free votes the country had seen. First, they gained a majority in parliament, then Morsi squeaked to victory in presidential elections held in 2012, becoming the first civilian to hold the office.
Critics accused the Brotherhood of using violence against opponents and seeking to monopolize power and Islamize the state. Massive protests grew against their rule, until the military -- led by then-Defense Minister Abdel-Fattah el-Sissi -- ousted Morsi in July 2013, dissolved parliament and eventually banned the Brotherhood as a "terrorist group."
El-Sissi was elected president and re-elected in 2018 in votes human rights groups sharply criticized as undemocratic. He has waged a ferocious crackdown that crushed the Brotherhood but also almost all other dissent, arresting tens of thousands, banning protests and silencing most criticism in the media.
Since his ouster, Morsi and other Brotherhood leaders have been put on multiple and lengthy trials. Morsi was sentenced to 20 years in prison on charges of ordering Brotherhood members to break up a protest against him, resulting in deaths. Multiple cases are still pending. Monday's session was part of a retrial on charges of espionage with the Palestinian Hamas militant group.
Magdalena Mughrabi, deputy director for the Middle East at Amnesty International, said Morsi's death "raises serious questions about his treatment in custody."
She called on Egyptian authorities to order "an impartial, thorough and transparent investigation into the circumstances of his death, as well as his detention conditions and his ability to access medical care."
In audio leaked from a 2017 session of one of his trials, Morsi complained that he was "completely isolated" from the court, unable to see or hear his defense team, his eyes pained by lighting inside the cage.