A perfect storm of public discontent has raged in Egypt.
The second anniversary of the revolution was always going to be marked by widespread protests against the government and the new constitution it introduced - but the resultant chaos was intensified by contentious verdicts in the deeply controversial Port Said football case that were coincidentally delivered at the same time.
Dealing with all of this is a new body, the National Defence Council. Headed by the President it's composed of senior ministers, parliamentary leaders, and military commanders.
It effectively replaces the Supreme Council of Armed Forces SCAF as the dominant body of security control.
It is after consultation with this body that President Morsi decided to impose a state of emergency and a curfew in three defined areas. This amounts to a re-imposition of military law, this time however under civilian supervision.
This may not satisfy many in the opposition, who have totally rejected the constitution, which provides the legal basis for the National Defence Council and the actions taken by the president on its advice.
Contrast with Tunisia
The clouds of teargas, the rattle of gunfire and a new state of emergency could not provide a greater contrast to the atmosphere in which neighbouring Tunisia celebrated the second anniversary of its revolution less than two weeks before.
There leaders of all parties gathered in Tunis's Kasbah for a simple and dignified flag-raising ceremony, followed by a special session of the National Constituent Assembly during which a historic pact was signed between the transitional government and the country's powerful labour union movement.
Throughout the day there was one long street party along the Avenue Bourguiba, the scene of so many clashes between demonstrators and police over the past two years.
Tunisia's transition to democracy has not be without a myriad of problems. The last year in particular has seen an increase in political violence and labour action within a society deeply impatient with what is regarded as the slow pace of real change.
Yet for one day at least the differences were largely put aside and the anniversary treated as a time for celebration and commemoration of hard won freedom rather than yet another opportunity to demonstrate dissent.
Where did Egypt get it wrong, what did it miss in transition?
The answer may lie in a single word that has figured prominently in the Tunisian political discourse - "consensus".
The dangerous split between secular and religious forces that continues to threaten Egypt's post-revolutionary process has been largely and intentionally avoided in Tunisia.
Political leaders have consciously sought what they call a "consensus among moderates" - the underlying belief that this would reduce the influence of the extremists found within all political movements be they secular or based on religious belief.
Stemming from this was a decision to seek approval for the new constitution by reaching consensus in the National Constituent Assembly rather than by public referendum.
This acknowledged intention was to avoid the deeply divisive electoral campaign that accompanied the adoption of a new constitution in Egypt.
A fundamental concept, though, on which the idea of consensus rests, is tolerance, another quality that has been lacking in Egypt’s transition.
Tunisia’s secular President Moncef Marzouki, who describes himself as a "moderate activist", uses the issue of capital punishment to illustrate how the process has worked.
He is deeply opposed to the death penalty, but is aware there are many as opposed to its formal abolition.
"They are not demanding hanging and so forth, but equally I cannot demand that the death penalty be prohibited in the constitution," he says.
"This is the way we will reach consensus: I know your red line and you know mine."
Marzouki’s counterpart in the religious spectrum of Tunisian politics is Rachid Ghannouchi, the leader of Ennahda, which is similar in many ways to Egypt's Muslim Brotherhood.
He ia a recognised expert on "political Islam", and his writings on the subject have been immensely influential in a country like Turkey, which has fused the principles of a secular liberalism and Islamic belief into a largely successful democracy.
Ghannouchi argues that consensus has been possible because the debate did not only begin after the revolution.
"We have been discussing the idea of consensus for the past three decades," he says.
"What we are now seeing is the result of a very very long and fruitful discussion."
There is still the potential for things to go very wrong in Tunisia the constitution remains under discussion in the National Constituent Assembly with no guarantee that agreement will be reached.
Yet the optimists are bolstered by the widespread acknowledgment of a fact that has apparently not been comprehended at all in Egypt: It is far more difficult to end dialogue than it is to begin it.