By M Ilyas Khan
BBC News, Islamabad
Pakistani troops have had successes against the Taliban
US President Barack Obama has not only ordered a troops surge in Afghanistan, but has also spelt out an exit strategy.
This has created a situation in Pakistan which is both perilous and promising, depending on which side of the national divide you stand on.
Since the reintroduction of democracy in 2008, the Pakistani power structure has evolved into two discernible blocs.
One bloc is led by the country's powerful security establishment, which still wields considerable power and has influential allies in the media and political circles.
The other is led by the political government, which has problems of governance and credibility and has a weak grip on power, but has large pockets of support in various parts of the country, especially in the south.
The two blocs have publicly voiced contradictory views on how Pakistan should treat its two most important neighbours, India and Afghanistan.
And this fundamental disagreement is likely to shape Pakistan's long-term response to America's impending endgame in Afghanistan.
For the moment, though, the Pakistani government has welcomed the US decision of a surge in troop numbers in Afghanistan, but has expressed concern over large deployments in the south which it fears will push the war into its territory.
The underlying argument is that while the Pakistani army has successfully dealt with militants in some parts of the north-west, the Western and Afghan troops have failed to do the same inside Afghanistan.
President Obama announced 30,000 more US troops would be deployed
Commentators close to the security establishment express the fear that the Americans will now force the Pakistani army to also fight their part of the battle, and that too on Pakistani soil.
This will complicate the situation in south-western Pakistan - the likely battlefield in such a scenario - where the country already faces an armed insurgency by separatist groups, they say.
Many in the political establishment also express fears publicly that an intensified campaign of drone strikes in Pakistani areas may stoke the fires of anti-Americanism and strengthen the extremists.
But in private conversations they also express hope that increased US pressure on Pakistan to squeeze the space for militant groups will weaken the army's resolve to continue to support and protect them.
Western and Pakistani analysts have long held that Islamic militant groups were created and managed by Pakistan's military intelligence community as strategic tools to destabilise India and Afghanistan, two neighbours that the army considers hostile.
Pakistan's top politicians privately agree that these groups were also used to subvert the political process at home.
The US announcement of a troop surge in Afghanistan, coupled with an exit strategy that becomes operational barely 18 months from now, means that Pakistanis will be under great pressure to dismantle these groups without further delay.
For many, this is an impossible task.
Some analysts believed to be close to the security establishment admit that the Pakistani intelligence services nurtured these groups as a foreign policy tool, but say they are no longer under the army's control and have taken on a life of their own.
They believe that a widening of the war will create conditions which would be beyond the control of the Pakistani security forces and may harm the country irreparably.
Targets deep inside Pakistan
But Obama administration officials apparently seem to think that the militants can be defeated, and that the key to this lies in Pakistan.
And there are indications that the Americans would be willing to go to any length to persuade the Pakistanis to do what is necessary.
A credible source in Islamabad told the BBC News website that if the Pakistanis were found to be dragging their feet on the issue of militant groups, the Americans might consider drone strikes on some important strategic targets deep inside Pakistan to hasten the process.
The source said a message to this effect had already been conveyed to the Pakistani leadership.
The Americans have not offered a quid pro quo for this, but there are indications that they may be working on other fronts to boost the Pakistanis' sense of security.
Analysts interpret India's decision to scale down troops in the part of Kashmir it controls - a region disputed by India and Pakistan - and to hand over security operations to local police there as the result of back-channel diplomacy involving some Western powers.
The Indian announcement came a day after President Barack Obama unveiled his Afghanistan policy.
So, there are obvious signs of a carrot-and-stick approach.
The way things stand now, Pakistan has much to gain from Mr Obama's strategy - but in return he will make big demands, particularly of the military.