ISLAMABAD - For the last decade, the United States and Afghanistan have viewed Pakistan as part of the problem as they worked to subdue the Afghan insurgency. Yet suddenly the three countries are working together for an Afghan peace, with Pakistan handling one of the trickiest aspects of the effort: bringing the Taliban to the talks.
From villain, Pakistan has emerged as the key to working out a deal, an amazing transformation for a country that was long seen as the Taliban's main foreign backer when they were in power in Afghanistan, and whose territory, willingly or unwillingly, provided a haven when U.S. and NATO drove the Taliban from power in 2001.
Driving the new collaborative spirit after years of acrimony, diplomats say, was one thing: fear that chaos will follow the NATO withdrawal from Afghanistan in 2014. Such anarchy could cost thousands more lives in Afghanistan, make a mockery of the U.S.-led coalition's claims of success, threaten the security of Pakistan and allow international terrorists, including al-Qaida, to find sanctuary there again.
Other countries also are involved heavily in the diplomatic push for peace negotiations, especially Turkey and the United Kingdom. Last month, Pakistan took the first step in trying to build confidence, freeing 18 low-ranking Taliban prisoners last month whose release the extremists had sought.
Pakistan had been ready to cooperate a year ago, said diplomats who, like other officials quoted here, spoke only on the condition of anonymity because of the sensitivity of the issue. But that was impossible after relations between Washington and Islamabad nearly broke down in the wake of a "friendly fire" incident in November last year in which American aircraft killed 24 Pakistani soldiers manning a border post. Ties between Pakistan and the United States were repaired only this summer.
Pakistan has called for a political settlement with the Taliban for years, an arrangement that would give them a share of power in Afghanistan. But the Afghan government until now hasn't been willing to trust Pakistan, suspecting that the Pakistanis wanted a return of the Taliban government, and the United States has pursued a policy that saw negotiations as something that could come only after decisive gains on the battlefield.
But that attitude has changed as it has become clear that the surge of troops President Barack Obama ordered to Afghanistan in 2009 failed to change the course of the war. With thousands of troops having returned home and tens of thousands more to follow soon, a cease-fire now wouldn't be so painful for the United States.
The new cooperative effort, which McClatchy Newspapers revealed last weekend, envisions a cease-fire in the second half of next year. It also contemplates the Taliban holding public posts that would essentially hand them control of parts of Afghanistan.
For Pakistan, a peace accord is vital because it has a ferocious extremism problem of its own, including a Pakistani version of the Taliban. Islamabad thinks that once the Afghan Taliban and its allied Haqqani network are politically accommodated in Afghanistan, they will abandon Pakistani territory. That would allow Pakistan to move against its own militants.
The two stripes of militants often share the same geographical space along Pakistan's border with Afghanistan, making that region an ungovernable threat to the whole of Pakistan.
The growth of the extremist menace in Pakistan and its apparent close cooperation with the Afghan Taliban and the Haqqani network has made Islamabad reassess the Afghan Islamist movement it once favored.
Aftab Sherpao, a former Pakistani interior minister, said, "Pakistan doesn't want a totally Taliban government. They want an all-inclusive government. If that doesn't happen, there will be trouble."
Pakistan wants not only the Taliban to be enticed back to Afghanistan, but also for the hundreds of thousands of Afghan refugees it has accommodated since the 1980s to go home. Around 3 million Afghans live in Pakistan, of whom about 1.7 million are registered, the largest such displaced population in the world.
Pakistan also is concerned about the trends it sees in Afghanistan: a deteriorating security environment, an economy that's drying up and deep internal political divisions. If that downward spiral continues, millions more refugees might flood into Pakistan, rather than those already there returning home, officials fear. Worse, chaos across the border would provide a sanctuary for Pakistani extremists. Pakistani militants already are using the eastern Afghan provinces of Nuristan and Kunar to stage attacks in Pakistan.
So a stable and peaceful Afghanistan, not a rerun of the 1990s Taliban-run Afghanistan, is in the interests of Pakistan.
"Afghanistan is nobody's strategic depth," a Pakistani official said, referring to the old Pakistani military doctrine that wanted to keep Afghanistan as a client state. "Everybody has tried to determine Afghanistan's future and failed."
So far, the Taliban haven't agreed even to consider talks with the regime of President Hamid Karzai in Kabul, seeing its officials as "puppets." Instead, it wants talks with the United States. A lot of persuasion will be needed to get them to start a dialogue with Kabul, the Pakistani official said.
Pakistan, he added, can only "try to persuade them to come to the table."
"We cannot force them," he said.
(Shah is a McClatchy Newspapers special correspondent.)