The mourning took on a more sinister note as gangs of young men started parading the streets of many Indian cities, including New Delhi, shouting slogans directed at Pakistan and “anti-nationals” — the preferred term of the Hindu nationalists for perceived foes and undesirables ranging from liberals to Muslims.

Several Hindu nationalist affiliates of Mr. Modi’s party led a campaign that targeted students from Kashmir studying in educational institutions across India. They managed to extract promises from a few colleges that they would not admit Kashmiri students.

The tone and tenor of the marches and the threats to Kashmiri students were not lost even on Mr. Modi’s own allies. In an editorial in its party newspaper, Shiv Sena, the Mumbai-based Hindu nationalist party, cautioned the prime minister that “there were political allegations that Prime Minister Narendra Modi could wage a small-scale war to win elections …. The rulers should not behave in a manner that these allegations gain credence.”

Mr. Modi’s political use of the deaths of “martyrs” is not new to India, but we haven’t seen it at such a scale since India and Pakistan fought a limited war over Kashmir in 1999. In the past two decades, Indian security forces have periodically been targets of violent insurgent attacks, some causing even larger numbers of casualties, but the grief has run its normal course.

Mr. Modi and his party seem to be working on a template of exploiting calamitous deaths that they have used before. In February 2002, soon after he took over as chief minister of the western Indian state of Gujarat, a train carrying Hindu religious volunteers was allegedly set on fire in the town of Godhra by a group of Muslims. Fifty-nine people died.

Mr. Modi ensured the bodies of the dead were taken to the Ahmedabad, the largest city in the state, and paraded through the city. Violence broke out soon after. Hindu mobs fueled by incendiary rhetoric from leaders of organizations affiliated with the Bharatiya Janata Party, targeted homes and businesses owned by Muslims. Over a thousand people were killed, over 700 of them Muslims.

In his campaign for the state elections held a few months after the violence, Mr. Modi barely disguised his hatred and contempt for the Muslim minority, describing them as a demographic threat to India and seeking to connect them with Pakistan. The insurgency in Kashmir, which is the only Muslim majority state in the country, is often invoked in the same fashion by Mr. Modi's Hindu nationalist party.