Egypt's ex-President Mohamed Morsi dies after court appearance
Egypt's first freely elected president had suffered from neglect during years of imprisonment after his 2013 overthrow.
Mohamed Morsi, who died Monday aged 67, was Egypt's first democratically elected president but spent just one turbulent year in office after the 2011 uprising before the army toppled him.
The Islamist's overthrow was followed by a brutal crackdown that killed hundreds of supporters of his Muslim Brotherhood movement and dealt a major blow to political Islam.
Morsi was sentenced to death in May 2015 for his role in jailbreaks during the uprising that ousted his predecessor, longtime autocrat Hosni Mubarak.
He successfully appealed and was awaiting the final ruling of a retrial when he died in a Cairo hospital after fainting during an "animated" session in court, judicial and security sources said.
A veteran activist and engineering professor, Morsi was among the Brotherhood leaders detained during the 18-day anti-Mubarak revolt in 2011, escaping with thousands of inmates who broke out of prison.
The son of a farmer, he was not the Brotherhood's first choice for president.
Nicknamed "The Spare Tyre", Morsi emerged as a compromise candidate to run in Egypt's first democratic presidential election in 2012.
Hailing from the movement's political wing -- the Freedom and Justice Party -- he was put forward after one of the Brotherhood's powerful financiers, Khairat al-Shater, was disqualified on technical grounds.
Many voters chose Morsi in a protest vote against Mubarak's last prime minister, Ahmed Shafiq, and he narrowly won.
- Deep divisions -
When taking office in June 2012, the bearded and bespectacled Islamist promised to be president "of all Egyptians" and was feted by cheering crowds in Cairo's iconic Tahrir Square.
But he was soon accused of failing to represent all Egyptians and of trampling the ideals of the anti-Mubarak uprising.
His rule was marked by deep divisions in Egyptian society, a crippling economic crisis and often-deadly opposition protests.
Derided by some as a "puppet of the Brotherhood", Morsi irritated the bureaucracy and many ordinary Egyptians by appointing members of the movement to key administrative posts.
Months after his election win, Morsi issued a decree that in effect shielded his decisions from judicial review, sparking deadly clashes outside his palace.
He was removed by his then-defence minister and army chief Abdel Fattah al-Sisi on July 3, 2013 after millions took to the streets demanding his resignation. Sisi became president a year later.
Morsi denounced a "coup" and his supporters insisted he was still the legitimate president of the Arab world's most populous nation.
Hundreds were killed in clashes that erupted when security forces dispersed two pro-Morsi protest camps in Cairo in August 2013.
Thousands of Morsi supporters were imprisoned in a crackdown and rights groups accused Sisi's regime of being even more repressive than the Mubarak authorities.
The years following Morsi's overthrow saw a surge in bombings and shootings targeting security forces, particularly in the northern Sinai Peninsula, a stronghold of the Islamic State group.
The jihadists say the attacks are in retaliation for the crackdown on Islamists.
- 'I am Dr Mohamed Morsi' -
Morsi himself was put on trial several times on charges ranging from killing protesters to jailbreaks to spying for Iran, Qatar, and militant groups Hamas and Hezbollah.
In the first verdict against him, a Cairo court convicted Morsi of inciting violence against protesters during December 2012 clashes after he decreed that his decisions could not be challenged by the judiciary.
He was sentenced to 20 years in jail in that case, and later received two life sentences in espionage cases.
Morsi steadfastly rejected the authority of Egypt's courts to try him and launched frequent tirades against Sisi from the dock and accused military chiefs of violating the constitution.
"I am Dr Mohamed Morsi, the president of the republic... This was a military coup. The leaders of the coup should be tried," Morsi said on the opening day of his first trial in November 2013.
He was later put in a soundproof glass dock to stop him interrupting the proceedings with outbursts.
Born on 8 August 1951 in the village of El-Adwah in the Nile Delta province of Sharqiya, Morsi graduated with an engineering degree from Cairo University.
He received a doctorate from the University of Southern California, where he was also an assistant professor in the early 1980s.
Morsi first entered the political arena in 2000 when he was elected to parliament as an independent, given the Mubarak-era ban on the Brotherhood.
He was a lawmaker until 2005 and served seven months in jail in 2006 for taking part in a demonstration in support of reformist judges.
In 2010, Morsi became a spokesman for the Brotherhood and a member of its politburo.
He was married with five children and three grandchildren.