Former Egyptian president Mohammed Morsi, the first democratically elected head of state in Egypt's modern history, died on Monday aged 67 after collapsing in a Cairo court while on trial on espionage charges, authorities said.
Morsi, a top figure in the now-banned Muslim Brotherhood, had been in jail since being toppled by the military in 2013 after barely a year in power following mass protests against his rule.
The public prosecutor said he had collapsed in a defendants' cage in the courtroom shortly after speaking, and had been pronounced dead in hospital at 4:50 p.m. It said an autopsy had shown no signs of recent injury on his body.
BBC Profile: Egypt's Mohammed Morsi
After decades of repression under Egyptian autocrats, the Brotherhood won a parliamentary election after a popular uprising toppled former president Hosni Mubarak, and his military-backed establishment in 2011.
Morsi was elected to power in 2012 in Egypt's first free presidential election, having been thrown into the race at the last moment by the disqualification on a technicality of millionaire businessman Khairat al-Shater, by far the Brotherhood's preferred choice.
His victory marked a radical break with the military men who had supported every Egyptian leader since the overthrow of the monarchy in 1952.
Morsi promised a moderate Islamist agenda to steer Egypt into a new democratic era where autocracy would be replaced by transparent government that respected human rights and revived the fortunes of a powerful Arab state long in decline.
But the euphoria that greeted the end of an era of presidents who ruled like pharaohs did not last long.
The stocky, bespectacled man, born in 1951 in the dying days of the monarchy, told Egyptians he would deliver an "Egyptian renaissance with an Islamic foundation."
Instead, he alienated millions who accused him of usurping unlimited powers, imposing the Brotherhood's conservative brand of Islam and mismanaging the economy, all of which he denied.
Security sources said the Interior Ministry had declared a state of alert on Monday, notably in Morsi's home province of Sharqiya in the Nile Delta, where the body was expected to be taken for burial.
Morsi had been in court for a hearing on charges of espionage emanating from suspected contacts with the Palestinian Islamist group Hamas, which had close ties to the Brotherhood.
His body was taken to the Tora prison hospital, state television reported.
His lawyer said Morsi's health had been poor in jail. "We had put in several requests for treatment, some were accepted and others were not," the lawyer, Abdel-Menem Abdel-Maqsood, told Reuters.
Morsi was serving a 20-year prison sentence for a conviction arising from the killing of protesters during demonstrations in 2012, and a life sentence for espionage in a case related to the Gulf state of Qatar. He had denied the charges.
Turkish President Recep Tayyip Erdoğan mourned his fellow Islamist as a martyr.
"Putting doubts aside, he has become a martyr today with the fulfillment of God's order ... Our prayers are with him," Erdoğan said.
"Condolences to all my brothers who walked the same path as he did. Condolences to the people of Egypt. Condolences to his family and those close to him."
Qatar's emir, Sheikh Tamim bin Hamad Al Thani, a backer of Morsi and his Brotherhood, tweeted his condolences to Morsi's family "and to the brotherly Egyptian people."
Reporting by Nayera Abdullah and Enas al-Ashray; Writing by Nadine Awadalla and Sami Aboudi; Editing by Kevin Liffey.
Sign up for The Top of the World, delivered to your inbox every weekday morning.