Ahmed Rashid, guest journalist and writer on Pakistan, Afghanistan and Central Asia, says Pakistan's leader faces a stark choice.
The aftermath of the Red Mosque siege
The storming of the Islamabad's Red Mosque last week, and the deaths of scores of Islamic militants has placed Pakistan and its leadership on the edge of a deadly precipice.
One wrong move and the already deeply polarized country could plunge into a permanent state of anarchic violence, bordering on civil war.
Al-Qaeda and underground Pakistani extremist groups have pledged to target President Pervez Musharraf, government ministers and the army in revenge for the commando action that bought down the Red Mosque, which had defied the state for six months.
Interior Minister Aftab Sherpao barely survived just such a suicide attack in late April. Gen Musharraf himself has been the target of several assassination plots.
And since the Red Mosque siege some 50 soldiers have been killed by suicide bombers and in ambushes by the militants in the North West Frontier Province (NWFP).
Now Gen Musharraf - himself a former commando - has promised to wage war against all extremist groups and to never allow a madrassa (religious school) to defy the state again.
He has sent thousands of troops to Swat, a tribal territory of NWFP and to the town of Tank where Pakistani Taleban and al Qaeda are attempting to impose their version of a Sharia state.
At the same time Gen Musharraf is faced with a middle-class movement of lawyers and professionals who are fed up with military rule and a burgeoning political opposition movement that held its biggest get together ever in London recently.
He is under intense pressure to spell out soon a time table for free and fair elections and his own future political role.
Although he has pledged to curb Islamic extremism repeatedly since 2001, he has failed to do so. But this time even he acknowledges that the crisis is far more serious.
Open war between the Islamic Republic of Pakistan and the so called 'Sharia state' of the Taleban has to be avoided.
Civilians are suffering in the violence in NWFP
A close adviser to the president says that when he finds himself in a crisis or a political trap, he carries out "a tactical retreat" which he then manoeuvres into "a strategic advance" in another direction altogether - leaving the past issues unresolved behind him.
"It's a typical commando's way of looking at politics and the world," says the adviser.
Now there appears to be no space left for tactical retreats.
He is faced with a stark choice - either go for the extremists in a consistent manner as he has promised to do in the past or once again try to appease them. The latter course, many fear, would put the future of Pakistan at risk.
Supporters of Islamic parties voice their anger at President Musharraf
Since 9/11 he has been accused of double-dealing with the West, sometimes bending to pressure to curb Islamic extremism and at other times allying himself with extremists to brow beat or blackmail the governments of Kabul, Delhi or Washington.
Thus far, he has never attempted to break the three decades old nexus between the army and Islamic extremists.
As a result al-Qaeda has found the space and support to regroup in Pakistan's tribal areas, the Afghan Taleban have found a safe refuge in Balochistan province and Pakistani Taleban have spread their propaganda across the Pashtun belt of north-west Pakistan.
If Gen Musharraf takes the first choice he will need to first garner political support and a new political mandate by allowing secular national parties such as Benazir Bhutto's Pakistan Peoples Party and smaller regional parties back into the political arena.
These are parties that have accused him of treating them with contempt since he seized power in a coup in 1999.
But striking a deal with Ms Bhutto and others would mean that the army would have to hold a genuinely free and fair election by the end of the year, allow the independence of the judiciary and media and share power with the politicians - something President Musharraf has been loathe to do.
Now it seems to many that the army needs to understand that it cannot take on the extremists unless it is prepared to have a credible parliament and civilian government to work with.
If he takes the second path it would mean striking more controversial and fragile peace deals with the Pakistani Taleban, the extremists and militant madrassas. This would involve allowing a weakening of the state's authority and credibility.
Taking the second path could also ultimately mean an abandonment of any pretence of democracy, the imposition of martial law, a further distancing from the West and enormous isolation from the majority of the people of Pakistan.
Whatever choice he makes, Gen Musharraf knows he will still be targeted by the extremists.
Ahmed Rashid is a Pakistani journalist based in Lahore. He is the author of three books including Taliban and, most recently, Jihad. He has covered Pakistan, Afghanistan and Central Asia for the past 25 years and also writes for the Far Eastern Economic Review, the Daily Telegraph and The Wall Street Journal.
This debate is now closed. Here is a selection of your comments.
Clearly Pakistan it at a breaking point and needs to change its entire course. President Musharraf could go down in history by holding free elections, empowering the judiciary and building the country's civil institutions. Easier said than done of course and it will require full cooperation from India, the US and EU to allow Pakistan to abandon its destructive military-driven policies. It is a shame to see a country with so much potential on the verge of collapse.
It is necessary for the survival of Pakistan that President Musharraf should go, so that pure democracy can prosper.
Rao M Yasrab, Pakistan
Well, the chickens have come home to roost. General Musharraf always encouraged and allowed militant groups to train on the Pakistani soil, and then under the nose of the intelligence agencies they were sent across the border to attack targets in India. Now the president is not happy because he is getting the taste of his own medicine. Well it is a funny old world, and your past will always catch up with you. It is time the general was gone and elections called to give a little international respectability to his country.
Hem Adwani, UK
President Musharraf is creating "the perfect storm" for him to stay in power. He has used the Red Mosque siege as a trump card (after feeding it candy for over six months) to distract the present civil movement for democracy. He has told the West: "It is either me in my khaki uniform or the radical mullahs". This man is Machiavellian beyond reproach. In reality Pakistan has an alternative in people power... but Musharraf is keeping the shutters closed on secular political parties by the barrel of the gun, incarcerations, self-serving ordinances, etc. The West should have a rethink on supporting this dictator.
Mohammad Ali Shaikh, Islamabad, Pakistan
I don't think conventional methods will win the war, and the government needs to pursue more subtle methods to deal with the problem of extremism. It needs to start welfare projects, and somehow educate the masses of that area to adopt a new approach towards life. I know methods like these might take time, but this seems to be the only way we can win the war against fundamentalism. The results of such an approach will be long lasting. Lets hope the world is patient and supportive enough of President Musharraf to accomplish this job, because let's not forget this problem was seeded by the West, when fighters were needed to defeat the Russians, and now Pakistan has to clean up the mess!
Abid Mohammadzai, US
The article represents the typical American approach to dealing with so called extremists. Can he explain that the word "extremist" is only applicable to people who are talking about Islam or the word "extremists" is also applicable to "liberal extremists", who ally themselves with the US war on terror which has killed scores of innocent people in Iraq and Afghanistan. What about the biggest terrorists of the world, like the US and UK - who killed so many innocent people in the name of their so called war on terror - and call their atrocities "collateral damage".
Mudassar Khan, Pakistan
The general is in a very difficult situation. He certainly can not be criticised for his handling of the Red Mosque affair. He tried to work with the fanatics through negotiations to achieve a peaceful solution but they were having none of it so he had little choice but to use force. What makes the situation worse is that religious parties in Pakistan are fuelling an already tense situation by not openly condemning these terrorists but instead calling them martyrs. Islam has never permitted suicide or anything close yet these parties are indirectly praising and promoting it. President Musharraf needs to take the no-nonsense approach and use force if necessary to stamp out this dangerous fanatical uprising. Today Pakistan is at its best economic, financial, and defence (military) position it has ever seen and that is credit to the government of Musharraf
I am reminded of the words of the Israeli politician, Shimon Peres, who after 9/11 commented, ¿General Musharraf signed his death warrant the day he decided to collaborate with the US against the Taleban and al- Qaeda.'
Azam Fazili, UAE
Pakistan's military rulers are in the clutches of a dilemma. They can ill-afford the loss of US aid, the mainstay of the country's economy and its ability to support an out-sized military establishment. But, over the years, militant, sectarian Islamism, anathema to the US, has become the country's ideology and the military's partner in suppressing democracy. US interests are also some what complex. In the short term, it should encourage the clampdown of the militants. It should, in its long term interest, also make sure that democracy is restored and the military retires to the barracks for good - as soon as possible, and as smoothly as possible
Thiruvengadam Ramakrishnan, US
The brutal use of force has proved counter-productive in Afghanistan and Iraq. A similar experiment in Pakistan will not have a different result. The only solution to all the problems of Pakistan including extremism is a fair political process without any involvement of the army. If the US and west continue to support General Musharraf, they will not win any "hearts and minds" in Pakistan. While a failure of policy in Iraq and Afghanistan may be affordable, such a failure in a nuclear state such as Pakistan will have different and possibly catastrophic implications.
Ali Akhtar Cheema, UK
I do not agree with this method of labelling anyone who wants and Islamic system as extremist/terrorist. After all that is what Pakistan was created for, to provide an opportunity for the Muslims of the sub-continent to live in a country run according to the Islamic rules and laws. So what I am suggesting is another option for President Musharraf, that is to actually start implementing the Islamic laws, something that each ruler of Pakistan is asked to do in the constitution. But it is extremely unlikely that such a course of action will be adopted under a secular minded ruler like Musharraf, so far he has gone in the opposite direction. An example of which is the replacement of Hadood Ordinance with the Women's' Empowerment bill.
Asim Mushtaq, UK
All President Musharraf's troubles are due to the his policies of following the commands of the Bush administration to fight his "war on terror". Extremism can only be eliminated from Pakistan and in all other Muslim countries through positive steps to engage people, not by bombing and killing innocent civilians.