Obituary: Mohamed Morsi
Egypt's first democratically elected president, who lasted only one year in power
Mohamed Morsi, who died in a courtroom aged 67 last Monday, became Egypt's first civilian head of state in June 2012 and the first Islamist to lead the Arab world's most populous nation; but elation soon turned to anger when he assumed powers as great as those exercised by the ousted president Hosni Mubarak, and he lasted only one year in power before being ousted by the military the following July.
Morsi was sworn in, in July 2012, after winning - by a small margin - a free election that gave Egyptians their first real choice of a leader, so it was said, in 7,000 years. It was a triumph for the Muslim Brotherhood, the Islamist movement which had been banned since the overthrow of the monarchy in 1952.
Morsi saw off a former general, Ahmed Shafiq, who was seen as a remnant of the hated Mubarak regime. His victory was greeted by spontaneous displays of jubilation throughout Cairo.
During his election campaign Morsi promised a presidency that would be based on Islam but would not be a theocracy - an inclusive "civilian state" that would embrace "all forces, presidential candidates, women, Salafis and our Coptic brothers".
While he did not explicitly mention the 1979 treaty negotiated between Israel and the Egyptian government of Anwar Sadat, he said he had a "message of peace" and would "respect all international agreements".
But even with the best will in the world, Morsi would have found it hard to bridge the huge divisions in Egyptian society, and his task was made all the more difficult by the actions of the Supreme Council of the Armed Forces, which had taken power when Mubarak stepped down in 2011.
In the run-up to the election, following a ruling by a Constitutional Court still packed with Mubarak-era judges, the council disbanded the Islamist-dominated parliament and passed legislation which gave it control over the drafting of a new constitution and immunity from any civilian oversight, effectively stripping the presidency of all authority.
Both sides made a show of unity as Morsi was sworn in at the Constitutional Court and made an address a few hours later at Cairo University as the ruling generals applauded politely.
Yet he made it clear he would not accept the status quo: "The [ruling] Supreme Council of the Armed Forces has honoured its promise not to be a substitute for the popular will, and the elected institutions will now return to carry out their duties as the glorious Egyptian army returns to being devoted to its mission of defending the nation's borders and security."
In August he pulled off a spectacular coup, gambling on disaffection within the junior officer ranks to issue a constitutional declaration revoking the Supreme Council's powers. The declaration met with minimal opposition.
But the drafting of a new constitution was more problematic. In June political parties had come together to agree the make-up of a new constituent assembly, after the first assembly was dissolved by Egypt's Supreme Administrative Court on the grounds that it included members of parliament (who elect the assembly) in its membership.
The approval of the draft and Morsi's subsequent call for a referendum brought together Egypt's divided opposition factions in a National Salvation Front, united in resisting what they saw as a power grab by "the new pharaoh" in the presidential palace.
On December 8 Morsi bowed to the pressure and rescinded most of his November 22 decree. He did not, however, agree to the opposition's demand that he postpone the referendum. It duly went ahead despite a boycott by the opposition National Salvation Front. The constitution was approved with 63.8pc of the vote on a 32.9pc turnout, but the result did little to quell the unrest.
On July 3 2013, after days of mass anti-government protests, Morsi was removed from office in a coup.
The son of a farmer and the eldest of five brothers, Mohamed Morsi was born on August 8, 1951 in Edwa, north of Cairo, and raised in poverty. A bright young man, he took a PhD in California in 1982 then became an assistant professor of engineering at the California State University.
In 1985 he returned to Egypt to head the engineering department at Zagazig University.
He had joined the Muslim Brotherhood in 1977, when the movement was banned.
In 2000 Morsi was elected to parliament, where he headed the Brotherhood's unofficial parliamentary bloc.
After being ousted from power, Morsi was convicted of various crimes in trials which Human Rights Watch described as being "compromised". From then on he languished in prison.
The Egyptian state broadcaster said that Morsi was attending a session in a trial on espionage charges when he collapsed and died.
In 1979 Morsi married his cousin, Naglaa Ali Mahmoud, who survives him with their four sons and a daughter.