President Obama's trip to India offers a crucial, and counterintuitive, opportunity missing in all the talk about Afghanistan: how to accommodate Pakistan's interests in that country. Unless we find a way to do that, Pakistan will not stop its tolerance of or support for the Afghan Taliban or other extremists on its border with Afghanistan - nor will it let us eradicate them. While serious analysts agree that such a shift is necessary for any U.S. success in Afghanistan, many fail to follow this logic to its conclusion: that we must persuade Pakistan it can crack down on Afghan extremists without jeopardizing its cross-border interests.

What are those interests? First and foremost, to minimize the presence and influence in Afghanistan of Pakistan's own archrival, India. Yet somehow this point is absent from most American debates about these issues, probably because of our narrow focus on terrorism and Islamic fundamentalism. In fact, the United States has stoked Pakistani paranoia by encouraging India to become the region's major economic player in Afghanistan, to train Afghan officials, and exercise other influence on the Afghan government and people.

To Pakistani perceptions, this raises the threat of foreign influence in Afghanistan, and increases Pakistani determination to hang on to the Taliban, the Haqqani group and other insurgent networks to both counter Indian influence and protect Pakistani interests in Afghanistan. This in turn makes it impossible for the United States to succeed in its declared goals of stabilizing Afghanistan and securing it against violent extremism while safely reducing the American military presence.

India, of course, is an increasingly important regional and global partner for U.S. foreign policy. But it is in India's self-interest to contain extremist pressures in Afghanistan and Pakistan - and one paradoxically clever way to do that is to lower India's profile in Afghanistan. During his visit, Obama should drive home the point that such self-restraint would best serve our common interest in stabilizing the region.

Pakistan's other major interest is to promote a friendly regime in Kabul. This is hardly as simple as it sounds. Afghans are famously proud and prickly about their independence, and some are still not fully reconciled to Pakistani rule over some 30 million Pashtuns across the border. In fact, Afghanistan has never recognized that border along the Durand Line, drawn by the British raj in 1893 to mark the limits of Afghan rule.

Recently, however, and entirely apart from, or even against American advice, the Afghan and Pakistan governments have moved to resolve some of their differences. Afghan President Hamid Karzai abruptly removed the chief of his National Security Directorate, Amrullah Saleh, who was widely viewed as anti-corruption but also anti-Pakistan (a point that received much less attention in the U.S. media). In return, Islamabad stopped blocking Afghan trucks from using Pakistani roads and negotiated an Afghanistan-Pakistan Transit Trade Agreement allowing Afghan traffic all the way to India.

There is much the United States should do to capitalize on this momentum. Most urgent is to start working closely with Pakistan on our Afghan reconciliation and reintegration policies, instead of ignoring Pakistan's expressions of interest in these plans. We should also tell Islamabad that we are encouraging Kabul to send security personnel for Pakistani (rather than Indian) training - and then do so. We should encourage Kabul to pursue reasonable confidence-building measures, such as letting Pakistan know about pending Afghan government appointments in the border provinces. We should advise Pakistan that the United States recognizes the Durand Line and will work with the Afghan government to lay this ancient issue to rest.

All these small steps will help convince Pakistan that it can work more confidently with us and with the Afghan government, without playing the old double game of keeping insurgents and extremists in reserve. While we cannot buy or bully Pakistanis into abandoning their interests in Afghanistan, we can show them new ways to secure those interests. Properly understood, this is no longer a zero-sum "great game" in the region.

Adjusting our policies to accommodate Pakistani interests is essential to U.S. national interests in Afghanistan. And contrary to conventional wisdom, it is consistent with the long-term interests of our friends in the Afghan and Indian governments in countering the violent extremists who threaten us all.

David Pollock, a senior fellow at the Washington Institute for Near East Policy, was a senior State Department adviser for the broader Middle East from 2002 to 2007 and served on the secretary's policy planning staff from 1996 to 1999 and again in 2001.