The Nato helicopters that on November 26 flattened Volcano and Boulder, two Pakistani military outposts on the Afghan border, also blasted the alliance's own strategic interests. The Americans (and others) promptly talked of an accident, offering condolences and an inquiry into how 24 Pakistani soldiers were killed, and 13 more injured, during a night of attacks.

They also spoke of provocation by Taliban militants, who enjoy sanctuary on Pakistani soil and tentative backing from its army. A suggestion was even aired that there had been firing from the bases themselves.

Pakistan responded with fury, denying any provocations and accusing the attackers of outright aggression: a deliberate assault on its sovereignty. Nato had grid references for the posts, hundreds of metres inside Pakistani territory, yet had bombed sleeping soldiers and others who raced to help.

The attack continued for an hour or more, allegedly ignoring frantic appeals to halt. Pakistan's media dutifully pumped out the army line, stirring public outrage.

Surviving the test

Relations look dire. As a result of the incident, Pakistan's government said on November 29 that it would boycott the Afghan talks that are about to open in Bonn. Its army told America it must, within days, stop using Shamsi airbase in Balochistan for launching its drones.

Two land corridors that provide Nato in Afghanistan with half its supplies were shut. American demands for military intervention against insurgents in North Waziristan will again be batted away.

Yet the fact that the broad relationship has survived other severe tests this year suggests it may get over this one too.

Pakistanis were whipped into a fury when a CIA contractor shot dead two men in Lahore in January, provoking weeks of confrontation. That quarrel had just about been patched up by May, when American special forces discovered and killed Osama Bin Laden nesting in a house in a military town, Abbottabad.

Then, in September, it was the Americans' turn for dismay, after an Afghan insurgent group, the Haqqani network, seen as having close ties to the Pakistani army, launched a prolonged attack on their embassy in Kabul.

Growing bitter

The spate of incidents may continue. Anti-Americanism in Pakistan is rising to intense levels, which could spur younger, religiously minded officers, especially those who have not been trained by America, to demand a snapping of ties.

Yet policymakers both in Pakistan and America are likely to conclude that they still get enough from each other to make it too risky to break up just yet.

America needs Pakistan to get the Afghan Taliban and Haqqani network to talks, to do more on counter-terrorism, to allow drones to keep flying in its tribal areas and to keep its big nuclear arsenal safely locked up.

In turn, Pakistan's army, which to its neighbours looks isolated and paranoid, has no serious alternative to bidding for more lavish American aid. The result could be dismally cynical: each side using and attacking the other — and growing ever more bitter.