Widespread detentions and property demolitions targeting Muslims in India have raised worries that right-wing Hindu nationalists are using last week’s terrorist assault in Kashmir to escalate an oppressive campaign against the country’s largest minority population.

Public outrage has grown following the killing of 26 persons, all but one of whom were Hindu tourists, by terrorists near the town of Pahalgam in the Indian-administered section of Kashmir, which has a Muslim majority. India has claimed that Pakistan had a supporting role in the attack, which Pakistan rejects.

India looked to be contemplating a military assault against Pakistan in reaction to the terrorist attack, with Prime Minister Narendra Modi threatening to track out the perpetrators and “raze” their safe havens.

So far, India’s federal government has focused on implementing a series of punitive actions against Pakistan, including threats to impede cross-border river flows. However, government and right-wing Hindu organizations have increased harassment of Muslims, framing it as a campaign against illegal immigration.

Local officials in various states ruled by Mr. Modi’s Bharatiya Janata Party have taken advantage of the situation to target “illegal Bangladeshis” and Rohingya, a Muslim minority who have fled Myanmar. These labels, notably “Pakistani,” are frequently used to attack Muslim migrants from different areas of India.

The deaths of Muslims were recorded in two states, Uttar Pradesh and Karnataka, with media sources indicating that they were hate crimes.

Security forces in Kashmir have detained hundreds of individuals as they search for the perpetrators of the April 22 attack, and they have blown up the houses of persons accused of terrorist links. According to one official, the sweeps, which have resulted in the incarceration of 2,000 individuals, are similar to collective punishments carried out by authorities in the past following attacks on security personnel in Kashmir.

Kashmiris in other states have experienced harassment and violence, including right-wing gangs video themselves attacking Kashmiri roadside sellers and threatening violence if they do not leave.

“The attack in Pahalgam was horrible, but it should not be used as a pretext to engage in reprisals and attacks on minorities, such as arbitrary arrests or summary punishments,” said Meenakshi Ganguly, the deputy Asia director.

According to Ms. Ganguly, “ultranationalist broadcast networks and social media users have been inciting hate” that has culminated in violence.

The early reaction to the terrorist assault was directed at Kashmiris and quickly expanded to a broader anti-Muslim feeling. According to commentators, this has exacerbated Mr. Modi’s party’s long-standing demonization of Muslims in order to unite India’s Hindu majority.

In the days following the incident, Kashmiri students studying in many places throughout India experienced abuse and threats. Omar Abdullah, Kashmir’s highest elected official, dispatched government ministers to several locations to “ensure the safety and well-being” of Kashmiri citizens.