The last week was a rollercoaster ride for Pakistan President Pervez Musharraf.
Hardly a week ago, Musharraf's political fortunes had plummeted to a low point. Some had begun to visualise it might be time to compose his political obituary. The entanglement with the judiciary was debilitating him.
However, Musharraf's restraint and tact in the early stages of the Lal Masjid crisis won him credit.
Musharraf got his point through, that he tried his best to be conciliatory and reasonable, without taking recourse to force against the militants holed up in the mosque. He let it be appreciated that it was most reluctantly, as a last resort, that he ordered the troops to storm the mosque.
Most certainly, he would have carried the army top brass along. Meanwhile, the government has carefully propagated its version that the remaining militants holed up in the mosque were hardcore 'terrorists' and that they probably included foreign nationals.
Musharraf would have been the clear winner if the standoff had ended peacefully. That seemed a distinct possibility on Monday evening. But in the event, the denouement has been bloody and controversial. It is a seminal moment for the Pakistan army.
In retrospect, it might appear that the government went through a carefully choreographed sequencing of responses after the troops besieged the mosque a week ago. Musharraf's detractors have suggested that there could be ambiguities in the unfolding drama, and that there might be something 'fishy'.
The crisis has accentuated the differences among the Opposition political parties. The absence of Benazir Bhutto and Maulana Fazlur Rehman from the all-party conference convened in London on Sunday at Nawaz Sharif's initiative brings out the disarray in the Opposition ranks.
The all-party conference ended up adopting a strident resolution vowing to oppose Musharraf tooth and nail, but it is highly doubtful if anyone takes it seriously.
Sharif remains badly isolated. The force of events at the Lal Masjid has forced the religious parties on the back foot. They are, even if reluctantly, compelled to accept the legitimacy of the government's security operation. Equally, the public opinion in the country has been vehemently supportive of the firm action by the government against the militants.
Arguably, Musharraf now finds himself well placed to strike a bargain on power-sharing with Bhutto. But there is another possibility. Following the Lal Masjid operations, he is sure to address the nation. The storming of the mosque has resulted in heavy casualties. The trauma of the Lal Masjid crisis has brought home to the Pakistanis how perilously unstable their country has become.
Musharraf can proclaim emergency rule with the promise to clean up the mess. The temptation would be there to project himself as a strong, decisive leader. All the contentious issues that bogged him down in the recent months - forthcoming elections, his decision to remain army chief, legal proceedings over his dismissal of the Supreme Court chief justice - could then be relegated to the backburner.
Musharraf's trump card has been, and still remains, the United States' strong backing for him. Washington's dependence on Musharraf is only increasing. The defeat in Iraq makes it imperative for the US to salvage the war in Afghanistan.
There is no better person than Musharraf that Washington could find in Islamabad at the present juncture. The Lal Masjid events have confirmed his control of the army. The troops carried out his orders with utmost professionalism and discipline within a chain of command.
The restoration of democracy in Islamabad will not be the priority for Washington in the coming months. If Musharraf shows the willingness, finally, to crack down on Islamist extremists, shedding his earlier prevarications, that would be a matter of immense satisfaction for Washington.
In the Lal Masjid crisis, apart from Washington, Beijing and London also voiced strong support for the Pakistan government. The support from these three key allies has helped shore up Musharraf's political standing.
But all this comes at a certain price. Admittedly, the bogey of the 'Talibanisation' of Pakistan has always been a bit of an exaggeration. The fact is the base of the Islamist forces in Pakistan remains fundamentally weak. Pakistan faces no such danger as a takeover by the Islamist radical forces. The temper of the overwhelming majority of Pakistanis is also such that they share a dislike toward the forces of extremism.
All the same, in the North-West Frontier Province and in the tribal areas bordering Afghanistan, the developments in Islamabad are bound to be seen as yet another instance of Musharraf acting at the behest of Washington, in America's interests.
Given the extent of bloodshed in the Lal Masjid operations, and the pervasive 'anti-Americanism', there is bound to be backlash from the jihadi elements. This can impact on the effectiveness of the security operations in the Pak-Afghan border region. Of course, Musharraf's personal safety will be put in serious jeopardy more than ever before.
But in the ultimate analysis, it is also not going to be a backlash that poses any serious challenge to the Pakistani State.
Complete coverage: The Lal Masjid standoff
More from rediff