Q&A: Egypt constitutional crisis
Egyptians have voted in a referendum on their country's draft constitution.
The poll took place amid a political crisis triggered by President Mohammed Morsi's decree giving him extensive new powers. Following widespread protests and strikes by parts of the judiciary, Mr Morsi rescinded most of his decree on 10 December. However, he refused to postpone the referendum, despite opposition demands.
Why is the draft constitution controversial?
The process of drafting a new constitution to replace the one suspended after Hosni Mubarak was overthrown began in March 2012. But it was slowed by a court ruling in April dissolving the first constituent assembly, amid accusations that it was dominated by Islamists.
In June, political parties agreed on the make-up of a new panel, which included a range of politicians, members of the armed forces, police, judiciary and trade unions, as well as Muslim and Christian leaders.
However, liberals, secularists and Coptic Christians continued to complain about the distribution of seats. Most of their representatives on the assembly boycotted its sessions leaving the majority Islamists with a relatively free hand, and 43 separate legal challenges to its constitutional legitimacy were filed.
Mr Morsi's decree of 22 November gave the 100-member panel until January to complete the draft constitution. But after the Supreme Constitutional Court said it would soon rule on the lawsuits, supporters of the president on the assembly decided to pass a rushed draft.
A large number of members boycotted the vote or had earlier resigned in protest over what they said was the failure of Islamists to compromise on key issues, including the place of religion in affairs of state.
Human Rights Watch says the draft provides for basic protections against arbitrary detention and torture, but fails to end military trials of civilians or to protect freedom of expression and religion.
What happens next?
Results from the referendum vote are expected to confirm the approval of the draft constitution. President Morsi will then call new elections for parliament's lower house within two months, in which Islamist candidates are expected to do well.
Analysts say the Islamists are likely to insist that laws are brought into line with Sharia, or Islamic law, especially in relation to morality, culture, and personal freedoms. There is also concern that new-found freedoms of the private press could be curbed.
Until the lower house is elected, parliament's upper chamber, the Shura Council, will assume temporary legislative powers. The Council is expected to vote on a law to restrict the right to demonstrate, which will come ahead of widely anticipated large-scale economic reforms.
The opposition has said it will reject the result of the referendum and has demanded an investigation into reports of voting violations, which - coupled with a low turnout - they say has compromised the integrity of the referendum.
How did the crisis start?
The crisis began when the president issued the constitutional declaration on 22 November which stated that his decisions were "final and unchallengeable by any individual or body until a new constitution has been ratified and a new parliament has been elected".
The declaration also said the constituent assembly could not be dissolved by the judiciary, pre-empting any ruling by the Supreme Constitutional Court (SCC) on its legitimacy. Liberals, Christians and secularists said it was dominated by Islamists.
The president portrayed his decree as an attempt to protect the transition to a constitutional democracy, but following days of protests he agreed to limit its scope to "sovereign matters". However, Mr Morsi insisted on keeping his right to protect the constituent assembly.
Despite that, members of the assembly began a marathon overnight session of voting on a rushed draft of the draft constitution on 29 November after the SCC announced that it would rule on whether the panel should be dissolved.
The panel approved the draft - despite a boycott by secular and liberal parties and the Coptic Church - and sent it to Mr Morsi, who called a referendum.
The move by the president and his Islamist allies caused further public outrage, and tens of thousands of people soon took to the streets of Cairo calling for Mr Morsi's downfall. There were deadly clashes on 5 December when opposition demonstrators were confronted by Muslim Brotherhood supporters outside the presidential palace.
On 8 December, the president bowed to the pressure and rescinded most of his 22 November decree. He did not, however, agree to the opposition's demand that he postpone the referendum.
What do the opposition want?
The decree and the referendum have brought together Egypt's fractious and divided opposition factions, who are now united in their resistance to what they see as a power grab by the president and his allies.
On 24 November, a number of political parties and leading figures formed a coalition, the National Salvation Front (NSF), to force the president to rescind his decree and form a more representative constituent assembly.
Mohamed ElBaradei, the former UN diplomat who is co-ordinator of the NSF, said the draft constitution belonged in the "garbage bin of history". He compared the document to those passed in rigged votes under Egypt's former authoritarian rulers.
Mr ElBaradei later said President Morsi's refusal to postpone the referendum until there was consensus on the draft charter had "closed the door to any dialogue".
The Coptic Christian Church, whose members make up about 10% of Egypt's population, said the constitution represents only the Islamists who drafted it.
What does the president say?
Mr Morsi portrayed his decree as an attempt to protect Egypt's transition to a democracy more than 20 months after Hosni Mubarak's overthrow, and stressed that his new powers would last only until the new constitution was approved and fresh parliamentary elections were held.
He also dismissed the criticism of the constituent assembly and draft constitution, saying that Egyptians were "going to get out of this short bottleneck hugging each other".
A day after the violence on 5 December, Mr Morsi used a televised address to blame a "fifth column", saying remnants of the Mubarak regime had been "hiring thugs and giving out firearms". He promised he would never tolerate anyone working to overthrow of his "legitimate" government. "It is my duty to defend the homeland," he added.
On 8 December, Mr Morsi sought to appease his opponents with a package of concessions, including rescinding most of his decree - a step he had appeared to dismiss days earlier. He also offered an arrangement for his opponents and allies to negotiate constitutional amendments that would be added to the constitution after the referendum.
How did the judiciary see the referendum?
Judges reacted angrily to President Morsi's constitutional declaration, which rendered his decisions immune from judicial review and protected the constitutional assembly from dissolution.
On 28 November, the judges of the Court of Cassation and Court of Appeal said they had suspended all work until the decree was rescinded.
Members of the Supreme Constitutional Court followed suit four days later when Islamist supporters of the president prevented them from meeting to reveal their ruling on the legitimacy of the constituent assembly.
Hours later, leaders of the largest association of judges, the Judges' Club, threatened to block the referendum by saying its members would refuse to perform their customary roles as election supervisors.
Since 2000, judicial personnel have had to oversee voting at every polling station. A boycott of the referendum by members of the Judges' Club would therefore have raised questions about the vote's validity and might have further undermine the constitution's legitimacy.
It was not clear exactly how many judges abided by the boycott call, but the organisation's earlier call for a strike to protest against Mr Morsi's November constitutional declaration enjoyed only partial success.
What is the position of the military?
The military is the most powerful government entity in Egypt and was the power behind all previous presidents. The Supreme Council of the Armed Forces (Scaf) ruled the country after the fall of Hosni Mubarak, but it was pushed aside in August by President Morsi.
The generals stayed out of the limelight at the beginning of this crisis, but on 8 December they urged the government and opposition to resolve their disputes via dialogue, warning that they would not allow the country to be dragged into a "dark tunnel".
A statement said the solution should not contradict "legitimacy and the rules of democracy", and that the military realised its "responsibility to preserve the higher interests of the country and secure and protect vital targets, public institutions and the interests of innocent citizens".