Pakistan moved towards a precipice, teetered on its edge and moved back. Internationally there was a collective sigh of relief that a disaster had been averted. Within Pakistan there is jubilation. People power has triumphed over State power. The State after flexing every muscle it had, gave in to the marching hordes. It was the right thing to do because the other option would have led to the end of democracy. Now democracy stands strengthened and the roadmap to a shift of the power center to the people is clear. This opens a new chapter in Pakistan's history as hope and optimism pervade the environment after the gloom generated by the deadlock. The deposed Chief Justice was already a hero for the people simply because he had stood up to a military dictator. Now there are other heroes; the politicians who defied arrest and braved barricades and police brutality, the lawyers who sparked the demand for an independent judiciary under the re-instated Chief Justice, the people who thronged to the rallies and marches oblivious to the danger and discomfort and the media that defied gag orders and restrictions to bring the struggle into every household. Except for what the police did, there was no violence - just people who wanted justice, law and order, security and an enforcement of laws that limit excesses and make a democracy a republic that cannot be manipulated to suit individuals. There were many doomsday scenarios predicted as the drama played out on the streets and TV screens. The most pervasive view was that the 'high noon' in Islamabad would lead to military intervention because this was the experience of the past-crude outright takeover, forced resignations to drive out everyone and start anew and public criticism to pressure the government. There were also the Bangladesh and Thailand models with the military manipulating changes. This time the military followed what must be called the 'Kayani Model' -invisible but around, fully informed and acting through well timed and effective influence in the right quarter. The preference was for the institution rather than any individual and there was no personal angle or ambition. It worked. The lawyers, politicians and the people who were out on the street pitted against the power of the state never asked for military intervention - they relied on their own power and were prepared for the worst. The military acted to avert, to correct and to clear the way for full democracy with the center of gravity where it should be - in parliament and the people. As events unfold this is exactly what is likely to happen. There were phone calls from abroad, frantic running around by concerned envoys and negotiators trying to bring about a reconciliation that would have been a respite not the solution. The solution came from within-homegrown and totally suited to the environment and in line with the national urge not to derail democracy. This augers well for the future of democracy and for civil-military relations - the military has demonstrated its full support for democracy and abhorrence for intervention. The intelligence agencies have been kept out of the fray except for the over-watch necessary for national security. Quietly but firmly a precedence has been set to determine the future course of events; forging a national response to the threats, charting a blue-print for the economy, making a pragmatic foreign policy and bringing about effective responsive governance - all stemming from political stability. The biggest folly would be to start identifying winners and losers. There were none. Everybody won. If the government had not acted at the outset to ensure security there may have been a tragic event as in the past. If it had not responded to the will of the people it would have led to violence. If it had not listened to the voice of reason it would have doomed democracy. In the end the government did what was best for the country and the people - that is what governments are there for. The writer is former Chief of the Army Staff who now heads a think tank, Spearhead.