A neat trick? Perhaps. But it can be done.

First, America should stop giving free passes to the Pakistani military, which receives billions of dollars’ worth of aid even as it sponsors militant groups that murder Indians. An American law requires that the government, before releasing security assistance, certify that Pakistan’s armed forces have acted to stop Pakistan-based militants, including anti-India groups. But in recent years, the Obama administration has invoked national security waivers that bypass the certification process. That should stop.

Insisting on certification would show India that the White House holds Pakistan’s military to some account. And Pakistan would probably pass. Last year it launched a counterterrorism offensive in North Waziristan, and this month it pledged to ban several militant groups operating on its soil; together, those actions would probably allow Pakistan to attain certification today, as it last did in 2011. Second, Washington should help India guard against Pakistan-based terrorism. It should go beyond placing bounties on top militant leaders, as it does now, but stop well short of staging raids into Pakistan to seize them for transfer to India. It should instead deepen its sharing of intelligence technology with New Delhi to forestall attacks. Encouragingly, Mr. Obama’s visit has been preceded by speculation about a deal involving surveillance drones.

Washington should also target overseas financial holdings of Pakistanis who threaten India. One of India’s most wanted men, Dawood Ibrahim, is an organized crime boss frequently seen in Karachi. According to the United Nations, he funds the Pakistani militant group Lashkar-e-Taiba, which attacked Mumbai in 2008. He is believed to hold assets in Dubai. Washington should work with officials in the Persian Gulf to freeze those assets.

Third, the United States should try to steer Pakistan’s short-term focus away from Kashmir and toward normalizing trade relations with India. Trade negotiations have progressed in recent years, and Mr. Modi advocates using commercial diplomacy to improve relations with neighbors. And India would be relieved to hear less about Kashmir, an issue that is nowhere near resolution.

Of course, it would be a tough sell for Washington to persuade Pakistan that the economic benefits of trade with India would far outweigh any benefit possible from dwelling on Kashmir. But there may be no better time to try, given the relatively relaxed current state of American-Pakistani relations. Still, any efforts to reassure India must be accompanied by nuanced American diplomacy, so as not to feed into the “America and the world are out to get us” narrative that permeates Pakistan.