Egypt‘s first democratically elected president and top Muslim Brotherhood official Mohammed Morsi did not die of natural causes but instead was murdered, Turkey’s leader claimed Wednesday.

At an election rally in Istanbul, Turkish President Recep Tayyip Erdogan claimed he was murdered, citing evidence the deposed Egyptian president allegedly “flailed” in a Cairo courtroom for 20 minutes on Monday and nobody assisted him.

“Unfortunately, Mohammed Morsi was on the ground of the courtroom flailing for 20 minutes,” he told the crowd. “No official there intervened. Morsi did not (die) naturally, he was killed.”

EGYPT’S OUSTED PRESIDENT MOHAMMED MORSI DEAD AFTER COLLAPSING IN COURT

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 Arab Spring and ouster of longtime autocrat Hosni Mubarak.

Turkey's President Recep Tayyip Erdogan, has claimed that former Egyptian President Mohammed Morsi did not die of natural causes but that he was killed.

Turkey’s President Recep Tayyip Erdogan, has claimed that former Egyptian President Mohammed Morsi did not die of natural causes but that he was killed. (Presidential Press Service via AP)

The military, however, toppled Morsi in 2013 after massive protests and crushed the Brotherhood in a major crackdown, arresting him and many others of the group’s leaders.

The 67-year-old was buried on Tuesday under heavy security a day after his dramatic death inside the courtroom.

Morsi’s family attended funeral prayers in the mosque of Cairo’s Tora prison, followed by the burial at a cemetery in the Egyptian capital’s eastern district of Nasr City, Abdul-Moneim Abdel-Maqsoud, a member of Morsi’s defense team, told the Associated Press.

Supporters of the Pakistani religious party Jamaat-i-Islami, gather to offer a funeral prayer in absentia for ousted former Egyptian President Mohammed Morsi, in Karachi, Pakistan. Tuesday, June 18, 2019.

Supporters of the Pakistani religious party Jamaat-i-Islami, gather to offer a funeral prayer in absentia for ousted former Egyptian President Mohammed Morsi, in Karachi, Pakistan. Tuesday, June 18, 2019. (AP Photo/Fareed Khan)

Morsi’s son Ahmed said security agencies refused to allow Morsi to be buried at the family’s cemetery in his hometown of Adwa in Sharqia province, and instead had him interred at a Cairo cemetery dedicated to prominent Islamists. Dozens of people performed the absentee funeral prayer amid tight security in Adwa, according to residents and videos circulated online.

EGYPT AGREES TO PAY ISRAEL $500 MILLION TO END GAS DISPUTE

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.

Morsi’s Brotherhood has accused the government of “assassinating” him through years of poor prison conditions. The group demanded an international investigation into Morsi’s death on Monday and called on Egyptians to protest outside Egyptian embassies across the world.

Late on 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.

Erdogan said Wednesday that Turkey would do everything in its power to ensure Egypt faces trial in Morsi’s death. He also called on the Islamic Cooperation Organization to “take the necessary action” over Morsi’s death.”

An Egyptian judicial official told the Associated Press that 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 before collapsing minutes later.

In this 2015 photo, Egypt's deposed president Mohamed Mursi greets his lawyers and people from behind bars at a court hearing.

In this 2015 photo, Egypt’s deposed president Mohamed Mursi greets his lawyers and people from behind bars at a court hearing. (REUTERS)

Rupert Colville, a spokesman for the United Nations High Commissioner for Human Rights, called Tuesday for a “prompt, impartial, thorough and transparent investigation” into Morsi’s death.

Human Rights Watch also criticized Egyptian authorities for failing to provide adequate medical care for Morsi as “horrific.”

“At the very least, the Egyptian government committed grave abuses against Morsi by denying him prisoners’ rights that met minimum standards,”  the New York-based group’s Sarah Leah Whitson said.

CLICK HERE FOR THE FOX NEWS APP

Egypt’s state information service later said Whitson’s statements were “nothing but false claims” that reaffirm what it called HRW’s tradition of “circulating lies.”

The Associated Press contributed to this report.