Q&A: Crisis in Egypt
Egypt has been witnessing a bout of legal wrangling which, for many, is part of a power struggle between the Islamists and the army.
The Supreme Constitutional Court (SCC) on 10 July suspended a decision by the new Islamist president, Mohammed Mursi, to reinstate the People's Assembly (lower house of parliament), where the Islamists held more than 70% of seats.
The military council had dissolved parliament after the same court ruled in June that the assembly was null and void as it was based on a faulty election law.
The army had officially transferred power to President Mursi on 30 June, but retained some significant prerogatives.
Why was parliament dissolved?
When the SCC looked into the parliamentary election law, it found that it breached equality principles, as it allowed party candidates to contest one-third of seats originally dedicated to independents. The SCC ruled that the articles of the law related to the election of this one-third were unconstitutional.
In detailing the reasons for its ruling, the court concluded that, as a result, the entire People's Assembly was null and void.
Based on this, the ruling Supreme Council of the Armed Forces (Scaf) dissolved parliament.
This marked the start of the dispute. Islamists and legal experts supporting them said that the Scaf had no power to dissolve parliament. They also said that the court went beyond its jurisdiction by ruling that the assembly was not valid. They argued that it should have only ruled whether the election law was constitutional or not.
Also, the Islamist lawmakers wanted to find a mechanism to apply the SCC's ruling themselves, not to be dissolved by the Scaf. Given this, they wanted to remain in session and find a way to deal only with the one-third of seats that caused the original problem.
Why was parliament reinstated?
Mohammed Mursi issued a presidential decree cancelling the Scaf's executive decision to dissolve parliament. According to the decree, parliament should convene again, and within two months after the approval of a new constitution, a new parliamentary election will be held.
The president's legal advisers said the decree represented a mechanism for implementing the SCC's original ruling. But legal experts opposing them argued that the court's ruling was clear in saying the assembly "no longer sits with the force of the law, without the need for any additional measures". They say that parliament was no longer valid anyway, even without the executive decision by the Scaf.
Some also thought that Mr Mursi was trying to wrestle back legislative power from the Scaf, and to ensure that the assembly drafting the new constitution remains away from any Scaf control.
However, many legal experts argue that given the SCC's ruling the legislative power would still have rested with the Scaf, and any laws that would have been passed by this parliament after being reinstated would have been null and void.
What happened next?
A number of people went back to the SCC on the basis that its original ruling was being obstructed by the president's decision.
The court on 10 July looked into the case and issued a ruling overriding the president's decree.
The court upheld its previous ruling that the entire People's Assembly was null and void and could no longer sit.
What powers does the Scaf have?
The Scaf has the right to make laws, but these laws must be endorsed by President Mursi before they take effect. In addition to legislative power, the Scaf has control over all army affairs, including its budget, the appointment and dismissal of its commanders and the extension of their service.
The Scaf has no say in the current constituent assembly. But there are lawsuits filed with the courts against the formation of this assembly which will be examined in early September.
What power does President Mursi have?
Mohammed Mursi can hire and fire government, governors and other state officials. He can declare war but only after the approval of the Scaf. He also decides on foreign policy affairs.
BBC Monitoring selects and translates news from radio, television, press, news agencies and the internet from 150 countries in more than 70 languages. It is based in Caversham, UK, and has several bureaux abroad. For more reports from BBC Monitoring, click here