As the US searches for an exit from Afghanistan, it is increasingly relying on Pakistan's powerful army chief to help pave the way despite fresh allegations that spies under his command have long aided the Taliban.
Gen Ashfaq Parvez Kayani's critical role in the Afghan conflict was reinforced this month when the civilian government extended his term by three years. Kayani, 58, is known to be popular among US and NATO generals who have sought to enlist his help in battling militants along the country's border with Afghanistan.
So crucial is Kayani to the American war effort that when classified documents were posted by Wikileaks this week suggesting that Pakistani spies led by Kayani had colluded with the Taliban, the Obama administration didn't utter a word of opprobrium against him publicly.
The Americans need Kayani's cooperation to keep nuclear armed Pakistan stable and allow US missile strikes against Al Qaida in the country's northwestern border area.
The Afghans are cozying up to him with an eye on using Pakistan's links to the Taliban ties which the Pakistani government denies still exist to facilitate possible peace talks with the militants.
And the Afghan Taliban are counting on him to limit the pressure they feel in their hideouts in Pakistan.
Analysts believe talk of dubious alliances shows Kayani's desire to put Pakistan's interests first, no matter what that means for Washington or Kabul. Pakistan fears that Indian influence in Afghanistan threatens to leave the country flanked by hostile powers India to the east and Afghanistan to the west.
President Barack Obama's plan to begin withdrawing US troops from Afghanistan in July 2011 raises the prospect that Taliban militants may someday share power in Kabul. So Pakistan can hardly afford to make enemies of various Afghan Taliban groups, analysts said.
"Pakistan's and the United States' strategic interests have remained divergent," said Moeed Yusuf, a South Asia expert with the US Institute of Peace. "So ultimately, what Kayani is doing from his perspective is entirely rational once you accept his starting premise, which is Pakistan's strategic interest."