Indian Prime Minister Narendra Modi is promising a harsh response to Thursday's terrorist attack by Pakistani terrorist group Jaish-e-Mohammed. Bombing an Indian security forces convoy, JeM killed at least 46 personnel in India's northern Jammu and Kashmir province. And with a general election coming in April, Modi has added political reason to retaliate against Pakistan, possibly with limited military action.

Modi's first reactions to the attack have certainly been aggressive. Speaking on Friday, the prime minister granted wide latitude to counterterrorism forces, pledging: "I want to tell the terror outfits and those abiding and abetting them that they have made a big mistake. They will have to pay a very heavy price for their actions. Let me assure the nation that those behind this attack, the perpetrators of this attack will be punished." Reflecting Indians' common fury, the normally Modi-agitating opposition leader Rahul Gandhi has thrown his full support behind the government. Politicians of all stripes know the public wants retaliation.

But with most opinion polls showing the election will most likely produce a hung parliament and a coalition government of some kind, Modi has significant electoral interest in appearing as tough as possible. He will see that course as his best means of mobilizing unified support from his Hindu-nationalist base and other conservatives, because if he gets enough new support, the alliance Modi leads might win enough seats to return him a parliamentary majority.

Modi might now decide to authorize some kind of limited military action against JeM targets in eastern Pakistan. But complicating matters here is the fact that the JeM command and control heartlands are centered around 60 miles from the Indian border. That's out of range of Indian artillery platforms, so any action would appear to require air strikes. That matters because any air incursion into Pakistan would be far more inflammatory than a limited artillery action. Adding to the complication here is the fact that Pakistan's prime minister, Imran Khan, is an avowed populist who cultivates Islamic extremist groups. He would face great pressure to strike back in the event of any Indian strike.

The United States should attempt to mediate here. Recognizing justifiable Indian anger and Pakistan's continuing support for fanatics, the U.S. should immediately call a U.N. Security Council vote that forces China either to support a crackdown on Pakistani terrorism or to show its hand against India. The U.S. should also increase pressure on Khan's administration, making clear that his failure to restrain JeM will precipitate greater U.S. drone activity and more overt support to Indian counterterrorism efforts.

Regardless, the risks here are significant. The Indian and Pakistani security establishments despise one another and their political leaders mistrust one another. And both sides retain significant stockpiles of nuclear warheads.