Now that the U.S. has openly accused Pakistan of helping plan and conduct the attack earlier this month on the U.S. Embassy in Kabul, the Obama administration’s exit strategy from Afghanistan is looking increasingly cloudy.

An American departure depends on Pakistan’s cooperation in keeping things quiet. Yet its spy agency, the ISI, helped plan and conduct the embassy assault with the Islamist Haqqani network, according to Admiral Mike Mullen, chairman of the U.S. Joint Chiefs of Staff. The U.S. government sees the Haqqani group, which is based in Pakistan, as an al-Qaeda affiliate. Pakistan denies these claims, but it has been unwilling to move against the group’s safe haven within Pakistan’s borders. The U.S. has threatened to take unilateral action if Pakistan doesn’t crack down.

Can the U.S. and Pakistan ever get on the same page?

Since the U.S. killed Osama bin Laden in Pakistan last spring, U.S.-Pakistan relations have been in free fall. The U.S. has put pressure on Pakistan to do more to fight terrorism. U.S. officials ended their “strategic dialogue” with Pakistan, suspended $800 million in military aid and, for the first time, made public their private views that Pakistan is duplicitous on counterterrorism matters. Recently, the administration openly implicated Pakistan’s military leaders in the murder of a Pakistani journalist, and now, Mullen has said the ISI and Pakistani army use the Haqqani network as “proxies.”

But pressure tactics haven’t worked. Pakistani officials counter U.S. threats of unilateral action with talk of closing supply routes to Afghanistan and ending all counterterrorism cooperation. In private, they say they have written off U.S. assistance as too small and inconsistent to influence their decision-making. Given the economic climate, they say, Congress would have trimmed the aid anyway.

Pakistan’s leaders also believe they can make friends elsewhere. For instance, when the U.S. rolled back energy assistance, which had been a big part of the bilateral relationship from 2009 to 2011, Pakistan restarted talks with Iran about building a gas pipeline between the two countries. This initiative undermined U.S. efforts to isolate Iran in the region. What’s more, such a pipeline would compete with the U.S.-supported TAPI project, which would bring natural gas from Turkmenistan to India and Pakistan through Afghanistan. The U.S. has been promoting the idea of Afghanistan as a transit corridor connecting resources in Central Asia to markets in South Asia and the rest of the world, creating a New Silk Road that would foster stability in Afghanistan.

Pakistan has been generally supportive of the New Silk Road but sees Iranian gas as a quicker and easier alternative to the Turkmenistan option. And this isn’t just about filling Pakistan’s energy needs. President Asif Ali Zardari has lauded the pipeline to Iran as a new paradigm for the region, a homemade alternative to the U.S.-backed New Silk Road. In seeking rapprochement with Iran, Pakistan is sending a clear message of defiance to Washington.

If Pakistan is willing to forgo American aid, what can the U.S. do to win Pakistan’s cooperation on stabilizing Afghanistan and fighting terrorists? The answer is simple: It needs to talk to Pakistan about Afghanistan’s future.

Afghanistan has been at the center of Pakistan’s strategic outlook for the past three decades. Officials in Islamabad worry that a future Afghanistan, at least as America envisions it, will make common cause with India to squeeze Pakistan and even snatch away its restless Pashtun region on the border with Afghanistan. Pakistan continues to look to the Taliban to protect its interests in Afghanistan. Pakistan won’t break with these and associated extremists unless it believes that an independent Afghanistan, with a strong military, won’t pose a threat.

The U.S. has done little to assuage such fears. Rather, it has decided to shape Afghanistan on its own. It is building a strong military and promoting reconciliation between the government of President Hamid Karzai and the Taliban. Afghanistan’s neighbors aren’t a part of this process but are expected to support its outcome. U.S. officials aim to accelerate the course of events with a regional conference in Turkey in November followed by an international conference in Germany in December.

Pakistan isn’t happy sitting on the margins; it wants a major role. The government in Islamabad would like to bypass the international conferences and deal with the U.S. directly in setting the terms of reconciliation talks, controlling the agenda, and keeping a firm hold on the Taliban as they negotiate for turf and power.

The U.S. isn’t ready to give Pakistan this role, especially with the current state of relations. And Afghan officials reject the idea that Pakistan should have a say on the future of their country. They would actually like to secure a U.S. promise to keep Pakistan out of Afghanistan indefinitely. But that would require a continuing, large U.S. troop presence, and the U.S. already has decided to leave.

Somewhere in this, there is a middle ground. The U.S. should reach out to Pakistan and attentively discuss with its leaders their interests and objectives in Afghanistan. Such meetings should precede any further U.S. steps, including talking with the Taliban, setting the stage for the upcoming conferences and signing off on any agreements.

This does not mean giving in to Pakistan’s demands, but rather treating Pakistan, rightfully, as a party with a special interest in Afghanistan’s future. The U.S. should make engagement with Pakistan on these issues contingent on tangible progress in Pakistan’s counterterrorism efforts. That would give Pakistan an incentive to rein in extremism on both sides of the border, which is what the U.S. needs, if it is to leave Afghanistan on schedule.

(Vali Nasr is a Bloomberg View columnist and a professor of international politics at the Fletcher School of Law and Diplomacy at Tufts University. The opinions expressed are his own.)

To contact the writer of this article: Vali Nasr at vali.nasr@tufts.edu

To contact the editor responsible for this article: Lisa Beyer at lbeyer3@bloomberg.net