Egypt's first democratically elected president Mohamed Morsi collapses during a court session and dies, Egypt's state TV reports.

Egypt's state TV on Monday said the country's overthrown president Mohamed Morsi collapsed during a court session and died. 

State TV said the 67-year-old Morsi, who hailed from Egypt's now-outlawed Muslim Brotherhood, was attending a session in his trial on espionage charges when he blacked out and died. 

"He was speaking before the judge for 20 minutes then became very animated and fainted. He was quickly rushed to the hospital where he later died," a judicial source said.

His body was taken to a hospital in Cairo, state TV said.

The request to bury the body of Morsi to his family cemetery was rejected by the Egyptian authorities.

Egyptian office of the prosecution announced that the body of Morsi was already buried shortly after pronounced him dead, Anadolu Agency says. 

There were six alleged crimes against the former leader, including escaping from prison during Egypt's 2011 popular uprising and conspiring with foreign powers during his tenure. Last year, Hosni Mubarak appeared in court to give testimony against Morsi on mass jailbreak charges and he failed to answer most questions claiming that he needed permission from the Sisi government and the military.

The country's interior ministry announced a state of high alert after the announcement of Morsi's death, local media reported.

Here is a look at his political career.

Morsi said he was a 'patriot' before death 

A defence lawyer said Morsi spoke for around five minutes during a court appearance before collapsing inside the cage he was held in and dying.

Kamel Mandour, a member of the imprisoned leader's defence team, said Morsi "was very calm and organised. He summarised our argument in three to five minutes. He insisted on a special tribunal as he is the president of the republic."

Mandour said that the former president, on trial for espionage, refused to reveal state secrets. "He said he is a patriot and loves Egypt and its people."

Brotherhood says 'premeditated murder'

Mohammed Soudan, a leading member of the Muslim Brotherhood in London, said Morsi's death is the equivalent of "premeditated murder" saying that the former president, in jail since 2013, was banned from receiving medicine or visits and there was little information about his health condition.

He added that Morsi during his trial was "placed behind a glass cage."

"No one can hear him or know what is happening to him. He hasn't received any visits for months or nearly a year. He complained before that he doesn't get his medicine."

Yehya Hamad, a former minister in Mohamed Morsi's government, blamed Egyptian authorities for Morsi's death, in an interview with TRT World.

Erdogan pays tribute to 'martyr'

Morsi 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, led by current President Abdel Fattah el Sisi, ousted Morsi in 2013 after massive protests. 

The field marshal led a major crackdown and crushed the Brotherhood, arresting Morsi and many of the group's leaders.

Turkey's President Recep Tayyip Erdogan paid tribute to Morsi and called him a "martyr" soon after his death was reported.

Funeral prayers for Morsi will be held on Tuesday in the nation's mosques, Turkey's religious affairs directorate said.

Forensic examination

Meanwhile, a statement by prosecutor Nabil Sadek said Morsi died after he spoke for five minutes during a court appearance before judges were set to announce a break.

It said prosecutors seized surveillance cameras in the courtroom and ordered Morsi's medical report.

The statement said a team of forensic experts is being assembled to examine Morsi's body to determine the cause of his death.

Meanwhile, Morsi's relatives said that Egyptian authorities refused the family's request for his burial in the family cemetery. There was no immediate reaction from Egypt on the family's charge. 

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, held inside notorious Cairo's Tora Prison, on charges of espionage with Gaza's governing Hamas group.

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 defence team, his eyes pained by lighting inside the cage.

"I don't know where I am," he is heard saying in the audio. "It's steel behind steel and glass behind glass. The reflection of my image makes me dizzy."

Throughout his trials, Morsi insisted he remained Egypt's legitimate president. In early court sessions, he gave angry speeches until judges ordered him kept in a glass cage during sessions where they could turn off his audio.

Source: TRTWorld and agencies