A controversial court decision on the eve of Egypt's second round presidential vote gives the nation's army the means to keep its key political role and challenge the Muslim Brotherhood, analysts say.
The constitutional court's decision on Thursday to invalidate parliament on the grounds that a third of its members were elected illegally was a blow for Islamists, who currently dominate the house but stand to lose ground in any new election.
The court also cleared the way for the presidential candidacy of Ahmed Shafiq, the last prime minister to serve under ousted president Hosni Mubarak.
Shafiq, a former air force general, is reportedly close to the military's ruling Supreme Council of the Armed Forces.
"After the verdict of the constitutional court, we are facing a constitutional coup" which strengthens the army's position, said Abdullah al-Sinawy, an Egyptian writer and political commentator.
"If the Muslim Brotherhood candidate fails to win the presidency, the loss for the Islamists will be all the harder because they are also being weakened on the parliamentary front," he said.
If Shafiq is elected, the military council leading the country is likely to transfer power as promised, without much reluctance.
But the Brotherhood's candidate Mohammed Mursi will face "lots of problems" securing the keys to power from the army, he cautioned.
For some experts, the court's decision is evidence of the tact with which the military has refined its strategy since taking power in February 2011, allowing it to protect its central role in the political process.
"The general judicial framework of the decision is shaky," said Mathieu Guidere, a specialist in the Muslim world at France's Toulouse University.
He stopped short of calling it a coup but said it was part of "a political strategy that has been carefully devised by the military, which is trying to keep all options open whatever the results of the presidential elections."
The parliament's invalidation in particular "leaves the field open for a rebalancing of the assembly in favour of Shafiq and a return to a presidential regime."
Khalil al-Anani, a Middle East specialist at Durham University in Britain, also said the ruling should be seen in the context of a wider army strategy.
"What happened yesterday is part of the whole transition plan that has been set up by the military," he said.
"The military over the past year-and-a-half has tried to absorb the revolutionary momentum," he added. "They started with the youth, and now they are trying to suppress the Muslim Brotherhood."
Strengthening the perception of a careful army bid to protect their powers is a decision by the justice ministry to restore the right of military personnel to arrest civilians.
That power was removed with the lifting of the decades-old, much-criticised state of emergency last month, and its activists immediately slammed the justice ministry's decision as a return to the repression of Mubarak's regime.
Egypt's army has long enjoyed a privileged role in the nation, producing all the country's presidents since the 1952 revolution against the monarchy, which was led by a group of "Free Officers" from the military.
With a secretive internal culture and sitting atop an opaque economic empire, it has preferred to maintain its influence from the shadows of a friendly presidency, rather than operate out in the open.
The Muslim Brotherhood, long repressed and kept largely underground, has on occasion held dialogue with the military, but now finds itself the institution's main rival on the political scene.
For Antoine Basbous, who heads the Observatoire des Pays Arabes in Paris, "we are witnessing a disguised restoration" of the military-political power system in Egypt.
"The Egyptian army is not ready to cede power and to see the Islamists throw their generals in prisons and return the troops to their barracks like in Turkey," Basbous said.