Profile: Egypt's Mohammed Morsi
Mohammed Morsi was Egypt's first democratically elected president, but lasted only one year in power before being ousted by the military on 3 July 2013.
The military's move followed days of mass anti-government protests and Morsi's rejection of an ultimatum from the generals to resolve Egypt's worst political crisis since Hosni Mubarak was deposed in 2011.
After almost two months in detention at secret locations, state prosecutors announced in September 2013 that Morsi would stand trial for inciting his supporters to murder a journalist and two opposition protesters, and ordering the torture and unlawful detention of others.
The charges related to clashes between opposition protesters and Muslim Brotherhood supporters outside the Ittihadiya presidential palace in Cairo in December 2012.
Morsi went on trial alongside 14 senior Brotherhood figures in November 2013.
At the first hearing, he shouted from the dock that he was the victim of a "military coup" and rejected the authority of the courts to try him. "I am the president of the republic, according to the constitution of the state, and I am forcibly detained," he asserted.
But in April 2015, Morsi and the other defendants were sentenced to 20 years in prison after being acquitted of inciting murder but found guilty of ordering the torture and detention of protesters.
Morsi has also been charged with several other offences, ranging from colluding with foreign militants to free prisoners during the 2011 uprising and leaking state secrets, to fraud and insulting the judiciary.
Mohammed Morsi was born in the village of El-Adwah in the Nile Delta province of Sharqiya in 1951.
He studied Engineering at Cairo University in the 1970s before moving to the United States to complete a PhD.
After returning to Egypt he became head of the engineering department at Zagazig University.
He rose through the ranks of the Muslim Brotherhood, joining its Guidance Bureau and serving as an independent in the movement's parliamentary bloc from 2000 to 2005.
He then lost his seat in his home constituency, after a run-off vote that he claimed was rigged.
As an MP, he was occasionally praised for his oratorical performances, for example after a rail disaster in 2002 when he denounced official incompetence.
Morsi was chosen as the Muslim Brotherhood's presidential candidate in April 2012 after the movement's deputy general guide, millionaire businessman Khairat al-Shater, was forced to pull out.
Although Morsi was seen as less charismatic, he was chairman of its Freedom and Justice Party (FJP) and considered a safe pair of hands.
In his election campaign, Morsi presented himself as a bulwark against any revival of the old guard of Hosni Mubarak.
When he came to power in June 2012 after a narrow election victory, Morsi promised to head a government "for all Egyptians".
But critics complained he failed to deliver during his turbulent year in office. They accused him of allowing Islamists to monopolise the political scene, concentrating power in the hands of the Muslim Brotherhood.
Moreover, they said he mishandled the economy and failed to deal with the very issues that led to the uprising that brought him to power: calls for rights and social justice.
Public opposition to Morsi began building in November 2012 when, wishing to ensure that the Islamist-dominated constituent assembly could finish drafting a new constitution, the president issued a decree granting himself far-reaching powers.
He agreed to limit the scope of the decree after days of opposition protests. But there was further outrage at the end of that month, when the constituent assembly approved a rushed version of the constitution - despite a boycott by liberals, secularists and the Coptic Church.
Amid increasing unrest, President Morsi issued a decree authorising the armed forces to protect national institutions and polling places until a referendum on the draft constitution was held on 15 December 2012. Critics said that decree amounted to a form of martial law.
The army returned to barracks after the charter was approved, but within weeks it was deployed in cities along the Suez Canal to halt clashes between opponents and supporters of Morsi that left more than 50 people dead.
On 29 January 2013 then armed forces chief - and now president - Abdul Fattah al-Sisi, warned that the political crisis might "lead to a collapse of the state".
In late April, opposition activists set up the grassroots Tamarod (Revolt) protest movement, collecting signatures for a petition complaining about Morsi's failure to restore security and fix the economy, and calling for fresh presidential elections.
Tamarod organised mass protests to mark the first anniversary of the day he took office. On 30 June 2013, millions of protesters took to the streets across Egypt.
In a speech on the eve of his election anniversary, Morsi struck a conciliatory tone, conceding he had "made many mistakes" and that they would "need to be corrected".
The protests prompted the military to warn him on 1 July that it would intervene and impose its own "roadmap" if he did not satisfy the public's demands within 48 hours.
As the deadline approached, Morsi insisted he was Egypt's legitimate leader, and that any effort to remove him by force could plunge the country into chaos.
"Legitimacy is the only way to protect our country and prevent bloodshed, to move to a new phase," he said.
On the evening of 3 July, the army suspended the constitution and announced the formation of a technocratic interim government ahead of new presidential elections.
Morsi denounced the announcement as a "coup". He was taken by the army to an undisclosed location, and was not heard from for weeks.
Mass protests were staged by his supporters on the streets of Cairo, demanding his release and immediate return to power.
The army responded by breaking up two protest camps in the capital by force on 14 August and arresting key Brotherhood figures. Almost 1,000 people were killed in a crackdown the interim authorities portrayed as a struggle against "terrorism".
That November, Morsi warned that Egypt would not be stable until "the military coup is eliminated and those responsible for shedding Egyptians' blood are held accountable".
"The coup has begun to fall apart and will topple in the face of the steadfastness of the Egyptian people," he told lawyers allowed to visit him in prison.
But although the military is struggling to tackle a full-blown jihadist insurgency in the Sinai Peninsula, President Sisi's rule appears secure because most Egyptians want an end to years of political turmoil that have hammered their hopes of prosperity.