Pakistan caught between trying to claim credit abroad, and assuring home critics it hasn't sold out to US
When US president Barack Obama telephoned Pakistan's president to tell him US forces had found and killed Osama bin Laden, he offered him a choice.
Pakistan could say it had helped find bin Laden or that it knew nothing. President Asif Ali Zardari chose the former.
The exchange, recounted by a senior Western official briefed on the May 2 raid in the town of Abbottabad, illustrates the sometimes deliberate confusion over how far Pakistan is co-operating with the US in fighting Islamist militants.
Unwilling to be seen as working too closely with a country which is deeply unpopular at home, Pakistan veers uncomfortably between trying to claim credit overseas while reassuring domestic critics it has not sold out to the US.
Those two irreconcilable public positions, combined with a real and deep underlying distrust between Pakistan and the US, mean that three weeks after bin Laden was killed, almost nobody knows for sure exactly what happened and why.
They may also be creating such strains within Pakistan that it is becoming harder to contain militants who on Sunday were able to overrun its naval aviation base in the city of Karachi.
After telephoning Zardari, Obama announced bin Laden's death in a televised address and added that "it's important to note that our counterterrorism cooperation with Pakistan helped lead us to bin Laden and the compound where he was hiding."
A Pakistani official, asked about the exchange between Obama and Zardari, said Pakistan's military leadership had also been on board initially in saying they had helped find bin Laden - a position reflected in early public and private statements.
But with emotions running high in both the US and Pakistan, that early emphasis on cooperation disintegrated.
In Washington, CIA director Leon Panetta insisted the US had acted alone because it did not trust Pakistan.
And in Pakistan, the second official said, the military leadership backed off its initial position after feedback from garrisons highlighted deep anger in the ranks about the breach of sovereignty involved in the US helicopter raid.
Worried about a backlash from Islamist militants if it were seen to have helped the US find and kill bin Laden, and insulted by Panetta's comments, Pakistan hit back.
Its political and military leadership, which official sources say initially welcomed bin Laden's death, began instead to criticise the US. Pakistan's parliament condemned the violation of sovereignty and called for an end to strikes by US Predator drones in the tribal areas bordering Afghanistan.
Yet those drone strikes - which have continued despite the parliament resolution - illustrate the same problem Pakistan faced in its response to the US raid which killed bin Laden.
Publicly condemned as a breach of sovereignty, they are privately condoned - provided, officials say, the targets are chosen in coordination with Pakistan.
Washington says it has no evidence Pakistan's leadership knew he was in Abbottabad, though his presence in a garrison town not far from the Pakistan Military Academy (PMA) has raised suspicions he had help from inside the security establishment.
And events of the past decade have provided plenty of cause for strains within the military and intelligence services, despite regular purges since the September 11, 2001 attacks.
Former president, Pervez Musharraf, who left office in 2008, worked closely with the US in tackling al Qaeda.
Himself the target of al Qaeda linked assassination attempts in 2003, he brought in General Ashfaq Pervez Kayani, now army chief, to dismantle the network and arrest the ringleaders. That effort culminated in the arrest of Abu Faraj al Libbi in 2005. It was a high point in the US-Pakistan relationship.
But things changed after that, though the impact of those changes - which preceded the time bin Laden was reported to have moved to Abbottabad five years ago - remains unclear.
Shortly after Libbi was arrested Musharraf began to declare that Pakistan had broken the back of al Qaeda.
According to Pakistan's version of events, it continued to pass on leads on al Qaeda to the Americans, including details of Arabic-language phone calls which were then used by the CIA to help track down bin Laden's hideout in Abbottabad.
But after 2005 it no longer gave it the same priority. It has since defended its failure to find bin Laden in part on the grounds that he no longer constituted a major threat.
"We had already killed all his allies and so we had killed him even before he was dead. He was living like a dead man," Pakistan's spy chief, Lieutenant General Shuja Pasha, told parliament, according to comments relayed by Information Minister Firdous Ashiq Awan.