M Ilyas Khan
BBC News, Karachi
The head of US spying operations says Pakistan is the base from where al-Qaeda is rebuilding itself. So what is to be made of the Pakistan government's avowed war on militancy?
Pakistan and Afghan army soldiers arrest a Taleban fighter
There can be no two opinions about the fact that Pakistan's decision to support America's war on terror in September 2001 was taken under duress.
This gave rise to a duality in the Pakistani strategy that has defied clear definition and encouraged al-Qaeda and Taleban elements as much as it has curbed them.
Almost overnight, the country faced the prospect of rolling back the entire operational and logistical apparatus it had put in place in the Pakistan-Afghanistan border region over the preceding decades.
The role of the Pakistani intelligence agency, ISI, in organising Afghan resistance against the Soviet troops during 1980s is well established.
The country's diplomatic, material and strategic support to the Taleban regime that took the stage in 1990s is well documented by the US state institutions and intelligence services.
To get this huge apparatus and the mindset attached to move in reverse gear has been a slow process, exposing Islamabad to allegations of complicity with the Taleban as early as 2002.
Media reports from that period quote incidents in which the Pakistani intelligence operatives were accused of protecting al-Qaeda and Taliban fugitives or sneaking into Afghanistan with military supplies for the Taleban fighters.
Pakistan was also finding it hard to roll back the Islamist insurgency in Indian-administered Kashmir, which was an extension of Pakistani strategy in Afghanistan and served the crucial objective of keeping the disputed valley instable.
President Bush tries to calm differences between the Pakistani and Afghan leaders
Top officials in the American administration, aware of the fact that Pakistan was crucial to their engagement in Afghanistan, started making concessions to Islamabad.
They seemed to believe that as long as Pakistan remained resolute, they could afford to be slow in Afghanistan.
This gave the Pakistani government the crucial breathing space needed to handle the issue more tactfully.
But analysts point out that this also renewed the urge among some sections of the establishment to desist from actions that could harm the country's interests in Afghanistan.
The American shift to the war in Iraq further eased the pressure.
The year 2004 can be considered as a watershed.
During that year, Pakistan started toning down its activity on the Line of Control in Kashmir. This came to a complete halt following the October 2005 earthquake in Kashmir that killed nearly 80,000 people.
In the tribal areas bordering Afghanistan, Pakistan started the year with hyped up military operations but ended it with peace deals in South Waziristan, leaving the district virtually in the hands of pro-Taleban militants known for harbouring Arab as well as Uzbek and Chechen fugitives.
Western observers believe that a similar deal with the militants in the neighbouring North Waziristan district turned a large swathe of Pakistani territory into an extended sanctuary for al-Qaeda and Taleban militants.
Taleban fighters in southern Afghanistan
To a lesser extent, Islamabad's writ has also withered in the tribal districts north of Waziristan, notably in the northern-most district of Bajaur.
In Pakistan's Balochistan province, while the military has focused on a Baloch nationalist insurgency, a sense of urgency in securing the ethnic Pashtun belt along the Afghan border has been lacking.
Western, as well as some Pakistani media, have described this belt as the largest sanctuary for al-Qaeda and Taleban elements in Pakistan.
On the Kashmir front, the presence of a strong state, India, forced the militants into a tight spot, reducing their room for manoeuvre.
In Afghanistan, the writ of the state runs thin, and the presence of foreign troops helps the militants reinforce their ranks endlessly.
Nato air strikes, or ground actions, that have caused civilian casualties have also fuelled recruitment to the militants by angry survivors of the attacks.
Last year has been particularly difficult, with close to 200 Western troops killed in action. Casualties among the Afghan government forces and civilians ran into thousands.
And many fear that the forthcoming spring offensive by Taleban may be even worse, causing unacceptably large Western casualties.
British soldier participating in NATO operation in Afghanistan
Analysts believe that this will leave the Western coalition forces with two options, both highly unsavoury.
They either carpet-bomb Pakistan's tribal areas and create a political turmoil in the region, or quit Afghanistan, as some of Pakistan's influential former intelligence operatives have been predicting.
But there is a third option as well.
If Nato and Pakistani officials are to be believed, Thursday's attack that killed a large number of Taleban fighters in the Barmal area of Afghanistan was the result of intelligence sharing and operational cooperation between the two sides.
From Nato's viewpoint, this is a tangible piece of action from Pakistan which has hitherto defined its role in the fight against terrorism in terms of the al-Qaeda operatives arrested or the number of troops deployed in the tribal areas.
If such pro-active cooperation extends over the next year, Taleban and al-Qaeda activities may be curtailed.
But if preparations for the forthcoming election in Pakistan divert the attention of the rulers away from its border region with Afghanistan, the al-Qaeda and Taleban are certain to do more damage next spring than they did last year.