Better India-Pakistan relations are necessary to reduce Pakistan’s apprehensions in Afghanistan. They also serve other long-term American interests: eliminating terrorist threats from the region, reducing the risk of nuclear war and supporting a greater global role for India.

To achieve this, the United States should facilitate an India-Pakistan dialogue on the full range of economic and political issues, including their mutual concerns in Afghanistan, without trying to stage-manage the results. The United States’ playing this role should be contingent on Pakistan preventing cross-border terrorist attacks in India.

President George W. Bush encouraged such a comprehensive dialogue after a dangerous nuclear standoff in 2002. Within three years, India-Pakistan relations had made unprecedented progress. Terrorist movement from Pakistan across the border dropped dramatically, and India and Pakistan got extremely close to signing a deal on Kashmir. The budding rapprochement was cut short in part by an internal political clash within Pakistan.

The United States must also get serious about a political settlement in Afghanistan that involves all elements of Afghan society, including the Taliban. An opportunity to start this process has been created by last week’s agreement between President Ashraf Ghani of Afghanistan and Prime Minister Nawaz Sharif of Pakistan to resurrect the stalled Quadrilateral Coordination Group (the United States, Afghanistan, Pakistan and China). The United States should back this effort as a means of getting the Taliban to the reconciliation table. Other regional consultative forums like the Kabul Process, started by Mr. Ghani recently, will remain useful in keeping a larger set of important countries engaged.

Without reduction in Taliban-led violence in Afghanistan, the Afghan government will be unable to rally its people behind negotiations. So in exchange for getting a say in reconciliation through the Quadrilateral forum, Pakistan must take verifiable steps to curtail the financing and arming of the Taliban, target those Taliban elements that oppose talks, and give those willing to negotiate with the Afghan government the freedom to do so. The United States also should work closely with China to encourage Pakistan. China has committed over $60 billion in investment in Pakistan and risks losing it if the region remains unstable.

Our recent conversations with senior Pakistani officials suggest that a window of opportunity exists. Pakistani officials recognize that the Trump administration will have little patience with them if it senses their continued double-dealing on Afghanistan. At the same time, they will not move if they see this as ignoring Pakistan’s own security needs.

This new, more strategic approach would give Pakistan the incentives it needs to work with the United States on common priorities across the region. And it does so without eliminating any United States options should Pakistan still fail to see the benefits for its own future.