Egypt’s only freely elected president, the Islamist Mohamed Morsi, who was deposed in a 2013 military-backed coup, died on Monday while on trial, the nation’s state television reported.

The 67-year-old US-educated civil engineer and political leader of the Muslim Brotherhood was on trial facing espionage charges when he reportedly collapsed.

“The body has been transferred to a hospital and necessary procedures are under way,” local television said.

Tightly controlled state television reported Morsi’s death by a heart attack without noting his tenure as president. According to the public prosecutor’s office, Morsi collapsed in a courtroom cage at about 4:50pm local time and was pronounced dead on arrival at hospital, according to news agencies. It was claimed there was no sign of injuries.

Morsi’s death while in custody will probably anger Muslim Brotherhood supporters throughout the Middle East and have international repercussions. The group is the oldest Islamist political organisation in the world. Morsi and the Brotherhood count Turkey and Qatar as major allies. His supporters accused the Egyptian state of killing Morsi.

“The Egyptian regime knew that the continued denial of access to medical treatment would lead to his premature death,” said a statement issued by Muslim Brotherhood leaders Amr Darrag and Yehia Hamed. “To that effect, the death of President Morsi is tantamount to state-sponsored murder.”

In pictures: Egypt protests on Arab Spring anniversary Show all 11 1 /11 In pictures: Egypt protests on Arab Spring anniversary In pictures: Egypt protests on Arab Spring anniversary Cairo anniversary protests A supporter of Egyptian President Abdel Fattah al-Sisi waves his national flag during a demonstration in Cairo on January 25, 2015 AFP In pictures: Egypt protests on Arab Spring anniversary Cairo anniversary protests A riot police officer holds a weapon during an anti-government protest in downtown Cairo January 25, 2015 Reuters In pictures: Egypt protests on Arab Spring anniversary Cairo anniversary protests An anti-government shouts slogans against the military and interior ministry during a protest in front of the journalists' syndicate in Cairo January 25, 2015 Reuters In pictures: Egypt protests on Arab Spring anniversary Cairo anniversary protests Anti-government protesters shout as they call out to others with them to walk into Tahrir square after they clashed briefly with pro-government protesters, in Cairo January 25, 2015 Reuters In pictures: Egypt protests on Arab Spring anniversary Cairo anniversary protests Anti-government protesters help an injured protester when pro-government protesters threw stones during a protest in front of the press syndicate in Cairo January 25, 2015 Reuters In pictures: Egypt protests on Arab Spring anniversary Cairo anniversary protests An Egyptian is arrested by plainclothes police in downtown Cairo, Egypt, Sunday, Jan. 25, 2015 AP In pictures: Egypt protests on Arab Spring anniversary Cairo anniversary protests Egyptian security forces deploy in the Cairo suburb of Matariyah, Egypt, Sunday, Jan. 25, 2015 AP In pictures: Egypt protests on Arab Spring anniversary Cairo anniversary protests A woman mourns during the funeral of Shaima al-Sabbagh, Alexandria, Egypt, 25 January 2015 EPA In pictures: Egypt protests on Arab Spring anniversary Cairo anniversary protests Two supports of ousted President Mohamed Morsi in front of security forces near Tahrir Square in Cairo (AFP) In pictures: Egypt protests on Arab Spring anniversary Cairo anniversary protests Egyptian policemen detain a supporter of the People's Alliance Party during a demonstration in Cairo's Talaat Harb square, near Tahrir square, on January 24, 2015 (AFP) In pictures: Egypt protests on Arab Spring anniversary Cairo anniversary protests People carry the coffin of Shaima al-Sabbagh during her funeral, Alexandria, Egypt, 25 January 2015 EPA

Their warnings were ignored by the international community, including their own government, and they have been tragically proved right.

Dr Paul Williams, a British MP, had warned that inadequate care would lead to a rapid deterioration of his long-term medical conditions that would likely lead to a premature death.

“We now call for a full international independent investigation into the death of President Morsi, and for these results to be made public. The first democratically elected president has died through a concerted and active campaign by the Egyptian regime. This is a gross violation of international law. It must not be allowed to stand,” the Muslim Brotherhood statement continued.

Reuters cited unnamed “security sources” as saying the interior ministry had “declared a state of alert” ahead of Morsi’s burial, but there was no such official statement. Despite harsh repression and security measures against all political opponents, Muslim Brotherhood supporters abroad have claimed their networks inside Egypt persist, albeit underground.

Born in Egypt’s Nile Delta, Morsi had been imprisoned during the reign of Hosni Mubarak, but escaped during Egypt’s 2011 uprising, emerging as a leading opposition figure. Though lacking charisma and resented by reformists within the Brotherhood as a hardliner, he became standard-bearer for the Brotherhood’s political aspirations after the more formidable Khairat al-Shater was disqualified from running.

He narrowly defeated a candidate supported by the military in 2012 elections, but then was felled and imprisoned in a 2013 popular uprising that led to a military takeover by Abdel Fattah el-Sisi, Egypt’s current president.

He has been held inside the notorious Scorpion section of Cairo’s maximum security Tora prison, along with other Muslim Brotherhood leaders.

Mr Sisi has since overseen an intense crackdown on the Muslim Brotherhood and anyone suspected of supporting the group.

A report last year by a UK-based inquiry concluded that Morsi’s health was deteriorating in prison and that “failure to provide him with adequate medical treatment could lead to his premature death”, describing the conditions in which he was being held as potentially “torture”.

Crispin Blunt, the UK member of parliament who chaired the inquiry by politicians and jurists, called for an independent international investigation into the death.