By M Ilyas Khan
BBC News, Islamabad
The president says he wants a modern, liberal society
Pakistan's military ruler, Gen Pervez Musharraf, has often been accused of tolerating elements in the military and the intelligence services who are known to maintain ideological and strategic links with the country's Islamic militants.
That includes those holed up in Islamabad's Red Mosque (Lal Masjid).
So does the final showdown at the mosque mean that Gen Musharraf is moving decisively against those elements - and if so, what are the consequences?
The government wavered for six months as the religious students of the mosque seminary enforced their idea of Islamic justice on music stores, suspected prostitutes and policemen in the capital who got too close to their premises.
But it plunged into action after the students briefly detained some Chinese nationals last month, provoking a strong reaction from Beijing.
Troops have now gone in full throttle to flush out the militants from the mosque.
At the same time, they have prevented the media from having access to information about the operation and the extent of casualties.
The military has been on the move in recent weeks
One reason may well be that the government is anxious to dampen extremist reaction and retaliatory strikes from elsewhere in the country, mainly in north-western areas where pro-Taleban militants have been flourishing in recent months.
But observers argue that the authorities are also eager to protect those in the security establishment without whose connivance the militants in the mosque could not have stocked up arms with which to fight for almost eight days.
One thing is clear though. The government put its foot down and rejected the mosque militants' demand for safe passage, demand supported by some politicians sympathetic to their cause.
This indicates that the government has been able to sideline pro-militant elements in the political and security establishment, at least for the time being.
Can Gen Musharraf continue this trend in the coming weeks and months?
Internationally, he has been able to salvage his falling reputation as a bulwark against extremists. This will get him some crucial military and diplomatic support from the west.
On the domestic front, his move against the militants appears to have the support of Pakistan's largest political party, the Pakistan People's Party (PPP), which recently frustrated efforts by the opposition groups to form a united front against him.
Troop movements in the sensitive north-western parts of the country during the last four days indicate that the government is willing to take the Red Mosque campaign to the doorstep of the militants.
The military has been deployed in Swat, a district in the north-west, in an apparent bid to put pressure on a firebrand cleric with militant links and a large following.
In the North Waziristan tribal district on the border with Afghanistan, the army has risked jeopardising a peace deal with local militants by re-occupying some check posts it had vacated as part of that deal.
Revenge strikes by the militants during the Red Mosque siege have led to the killing of at least 19 people, including 11 law enforcement personnel, in North West Frontier Province (NWFP).
Tension is also running high in the neighbouring tribal areas along the Afghan border where militant leaders wanted by the government have been addressing large public rallies held to condemn the mosque siege.
But if the government is going to take the militants on again, it could have major knock-on effects on its policy towards Afghanistan.
For two decades, the Pakistani security establishment has been heavily involved in raising and sustaining a militant infrastructure of Islamic fundamentalist groups.
The president wants to show he can be tough against extremism
This infrastructure was used as a policy tool to safeguard the country's security interests in Afghanistan and India, supporting the Taleban in Afghanistan and militant groups in Indian-administered Kashmir.
The policy has spawned a whole generation of Pakistani youth deeply sympathetic to Islamic causes around the world.
It has also created tensions in Pakistan's foreign and domestic policies. President Musharraf lays great emphasis on the need for a modern, liberal society on the one hand, while preserving the country's policies towards India and Afghanistan - supported by many Islamic hardliners - on the other.
Many analysts believe that a real shift in favour of liberal forces cannot take place without a critical evaluation of the country's policy towards Afghanistan.
Such a shift presupposes some fundamental social and political initiatives on the part of the government to pave the way for fair elections, full democracy and accountability.
That would also assume a stepping back by the military from its dominant role in Pakistan's political life.
One indication of whether Gen Musharraf intends to head in this direction would be if he orders an open inquiry into how and why the Red Mosque tragedy came about.