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." Regardless of differences in national interests, Kayani developed a strong rapport with senior US officials in both the Bush and Obama administrations. Since taking over as army chief in 2007, he has developed especially close ties to Adm. Mike Mullen, the chairman of the US Joint Chiefs of Staff.
Those who know him describe Kayani, an avid golfer whose hawkish face is marked by dark bags under piercing eyes, as more of a thinker than a talker. He rarely gives interviews.
Born in the Punjab province district of Jhelum, Kayani used his smarts and savvy to escape relatively humble roots and rise through an army otherwise dominated by the children of the elite.
Kayani was not in former President Pervez Musharraf's inner circle when the general seized power in 1999. But when Musharraf began negotiations on power sharing with former premier Benazir Bhutto in 2007, Kayani acted as a go between. Musharraf appointed him as the top commander in the garrison city of Rawalpindi in 2003, a sensitive position that has previously been a launch pad for coup plotters.
In 2004, Kayani was named the head of the military's Inter Services Intelligence, Pakistan's premier spy agency. It was a position he held around three years years that saw the Taliban gain strength in Afghanistan.
In recent months, US officials have repeatedly praised Pakistan's effort against Islamist extremists. That includes the army's offensives against the Pakistani Taliban, a militant network that aims to overthrow the Pakistani state. It also is thought to include a deal allowing US missile strikes against al Qaida and Taliban targets on Pakistani soil.
The Afghan government, meanwhile, appears to be seeking Pakistan's good graces as well at least publicly in hopes the Pakistanis can encourage the Taliban to agree to talks to end the war.
Afghan President Hamid Karzai has moved toward improving relations with Pakistan, visiting here last March and stating publicly that Pakistan has an important role to play in future peace talks.
In a country with a long history of military rule and weak civilian institutions, Kayani's position as chief of staff gives him broad powers outside of strictly military affairs. Attempts by Pakistani civilians to assert control over the army have at times been rebuffed, including a short lived proposal to put the ISI spy agency under the Interior Ministry.
Last fall, the US prepared a $7.5 billion humanitarian aid package for Pakistan. But the army raised objections to provisions that encouraged civilian control over the armed forces. The incident shook Pakistan's civilian leaders, who found themselves criticizing an aid package they could hardly afford to reject. The deal came through after Pakistani officials said they had received assurances from the US that Washington was not trying to intrude on Pakistani sovereignty.
Still, Kayani's presence through 2013 may give comfort to some civilian politicians because he's a known quantity. Ayesha Siddiqa, a Pakistani military analyst, said Pakistan's Western backers also are happy to see Kayani stay because they prefer the current power makeup in Islamabad to a government led by opposition politicians suspected of being too sympathetic to Islamists.