By Barbara Plett
BBC News, Islamabad
The US is concerned about militants in border areas
In recent days three top American generals have turned their guns on Pakistan, accusing elements of its main intelligence agency, the ISI, of supporting Taleban and al-Qaeda militants.
The unprecedented broadside followed the announcement by the US President Barack Obama of a new strategy for Afghanistan.
Mr Obama cited as its cornerstone the need to destroy militant safe havens in the Pakistani tribal belt along the Afghan border, something he knows can't be achieved without complete cooperation from the country's army and intelligence.
To win, or compel, such support, the president and his generals have offered a mixture of incentives and warnings: for example, an increase in civilian aid alongside a warning that there's no "blank cheque" for the military if it doesn't perform.
The charges against the ISI seem to be part of the latter. They are not new, but have never before been made so publicly.
The chairman of the US Joint Chiefs of Staff, Admiral Mike Mullen, said elements of the ISI maintain links with militants on Pakistan's borders with both Afghanistan and India.
General David Petraeus, head of the US Central Command, spoke of cases "in the fairly recent past" where the ISI appeared to have warned militants that their positions had been discovered.
According to the New York Times, Pakistani support to Taleban commanders extends to "money, military supplies and strategic planning guidance".
Last year Washington's suspicions were such that it scaled down intelligence sharing with the ISI, especially after accusing it of involvement in the July bombing of the Indian embassy in Kabul.
The charge of collusion is rigorously denied by Pakistani officials.
They insist top levels of the army and intelligence agencies were purged of ideological officers after 2001, when the government dropped its open support for the Taleban and fell in with what the US called its War on Terror.
They point out that Pakistan has lost more soldiers in fighting the Taleban and al-Qaeda on the Afghan border than all of the Nato forces combined; and that American officials acknowledge the ISI has captured more al-Qaeda operatives than any other intelligence agency.
Within the security establishment there is a belief that the ISI is being used as a scapegoat for coalition failures in Afghanistan.
However, few independent Pakistani analysts doubt the intelligence agency maintains links with Islamist militants, especially the Afghan Taleban who have sanctuary in the border region.
"The army will operate against militant groups that it defines as anti-Pakistan," says one informed observer who spoke off-the-record.
"But it will not go after those groups that have a purely Afghan agenda, like the Afghan Taleban. Not at least until the United States listens to what the army regards as Pakistan's legitimate regional concerns."
There are mixed views here about what those concerns are.
Some believe the military has never given up its policy of "strategic depth": the belief that in order to defend itself against its traditional enemy, India, to the east, it needs a pro-Pakistan government (like the Taleban) in Afghanistan, to the west.
Others say it wants a "neutral" Afghanistan.
But Kabul is not neutral as far as the army is concerned.
Its government is full of factions hostile to Islamabad and closely allied with India, Pakistan's great regional rival. And India is expanding its influence in the country.
This is all the more troubling because Pakistan's worried about its borders.
Afghanistan has never recognised the boundary drawn by the British, known as the Durrand Line. And the dispute with India over the Himalayan region of Kashmir continues.
US troops carry out joint operations with the new Afghan security forces
In such circumstances, the Taleban are an asset, not an adversary for the ISI, says the observer.
"The Pakistan army knows that it and the Taleban have Pashtun support on both sides of the Durand line. This gives it leverage, and means it can signal to the United States that it will not be abandoned in any Afghan deal."
Prior to his election, Mr Obama recognised that Pakistani peace with India was key to stability in Afghanistan.
Since his inauguration, however, he has dropped any suggestion of an initiative on Kashmir in the face of Indian objections.
Now, he hopes a mixture of carrot and stick will force a rethink of Pakistan's security calculation.
But for Pakistan's security establishment, its concerns - the presence of India in Afghanistan, Kabul's refusal to recognise the border, the festering Kashmir dispute - are strategic threats far greater than those posed by Islamist militants.
"The concept of pressuring Pakistan is flawed," Ahmed Rashid and Barnett Rubin have written in the Foreign Affairs magazine. "No state can be successfully pressured into acts it considers suicidal."
Ultimately America's leverage is limited: in pushing too much, it may lose even the limited cooperation it has.