Soon after he seized power in a bloodless coup in October 1999, General Pervez Musharraf spelled out his "vision for a new Pakistan". In a wide-ranging conversation, he denied that he had ever thought of staging a coup. But, the detailed way in which he described his "vision" made it clear that he could not have been swept to power without ever thinking of grabbing it.
That a general should be at the helm in Pakistan was nothing extraordinary. The military have ruled for more than half of its existence as an independent nation-state.
Nevertheless, what Musharraf offered was quite different from the ruling generals who had preceded him.
The first of them, General Iskander Mirza had treated Pakistan as a vast feudal state with himself as benevolent overlord. His successor, Muhammad Ayyub Khan had established a Latin American-style military dictatorship whose corruption tempered its violence. The next military ruler, Yahya Khan had not managed to remain sober long enough to give his chaotic and ultimately disastrous reign any discernible pattern.
What Iskander, Ayyub and Yahya had in common was their total lack of ideology. And that allowed the armed forces to stay out of the bitter feuds that had always marked Pakistani political life.
Pakistan's fourth military ruler, Muhammad Zia ul-Haq, however, proved different from his three predecessors. He saw himself as a "holy warrior" and claimed an "historic mission" to re-Islamicise Pakistan that, he believed, had veered away from the Only True Faith.
Whereas Pakistan's first three military rulers had come and gone without trying to alter the nation's way of life, Zia used the state as an instrument for reshaping the national culture. Pakistan was re-baptised "Islamic Republic" and given a new theocratic Constitution. The legal system based on Anglo-Saxon jurisprudence, was pushed aside in favour of the Islamic Shariah. Under Zia's patronage, the half a dozen or so Islamist groups that had never made an impression on Pakistani politics, grew into well-funded currents and, backed by the army's intelligence services began to claim a bigger share of power.
Pakistan's first three military rulers were ousted in coups organized by rival generals. The fourth, Zia, was killed in an air crash that many believe was due to sabotage.
Fast forward to 2007 and "the spring of discontent" that has already shaken Musharraf's rule. A resilient tribal revolt in the province of Baluchistan, a political duel with the Chief Justice, and spiraling sectarian violence have combined to produce the most serious crisis Musharraf has faced since his election as president in 2001. With general elections looming later this year, all the forces that wish to plunge Pakistan into chaos and possible war are positioning themselves for a showdown with the regime.
The question is: how would Musharraf's rule end.
Will he be ousted in another classical military coup as three of the four generals who preceded him were? Or will he fall victim to a murderous conspiracy like the one that removed Zia from the scene?
Ironically, the centerpiece of Musharraf's "new vision", as spelled out in 1999, had consisted of a pledge to develop a political system in which the army, rather than seizing power for itself at the first opportunity, would act as an arbiter of national politics and a guarantor of the constitution.
Inspired by the "Turkish model", Musharraf had promised to slowly dismantle the so-called "Islamic" structures set up by Zia, encourage secular politics, and encourage a democratic culture in which governments are changed through elections rather than coups and revolts.
And yet, seven years later, Pakistan is, once again, gripped by talk of another coup d'etat while radical Islamist groups get ready to profit from what they hope would be a systemic collapse at the centre.
Although the 1999 coup was an unpalatable act if only because it toppled a democratically elected government, it is possible to argue that Prime Minister Nawaz Sharif's dysfunctional and corrupt regime had already become unsustainable.
There is also little doubt that Musharraf has done a great deal of good. He has reduced levels of corruption, restored the economy to the path of growth, and restored some of the social and cultural freedoms taken away from the Pakistanis by General Zia. More importantly, perhaps, in 2001 Musharraf made the crucial decision to abandon the Taliban in Afghanistan and join the global war against terrorism on the side of the United States and its regional allies. Without a doubt, Musharraf has been the most successful of the five generals who have ruled Pakistan since 1947.
But, just as no man's life can be regarded as happy until he is dead, no ruler's reign could be described as successful until he has taken his last curtain call.
Seven years later, Musharraf's "new vision", inspired by the so-called "Turkish model" is nowhere near realization.
Nevertheless, the final chapter in Musharraf's rule could still be written in a number of different ways.
He could try to stage-manage the general election by preventing Pakistan's mainstream political parties and their known leaders from taking part. This would force him to increase his dependence on a handful of obnoxious Islamist parties that not only hate his "new vision" but have also tried to kill him on a number of occasions.
Alternatively, Musharraf could name a neutral caretaker government to organise and supervise the elections with the participation of all secular and democratic parties. He could announce a general political amnesty and invite the exiled leaders to return and form a united front against religious extremism and terror.
Pakistan's allies and aid-donors, both in the West and in the region, must use whatever influence they have to persuade Musharraf to be true to his own words as spelled out in 1999. There are enough democratic forces in Pakistan to take on and defeat the wave of obscurantism that threatens the whole region. Musharraf should give them a chance by allowing free and gar elections with the army acting as watchdog rather than puppet-master.