A wave of protests against a new citizenship law has broken out in cities across India, as demonstrators fear it could endanger the nation’s Muslim minority and chip away at the government’s secular identity.

The unrest has spread to more than a dozen cities, and Prime Minister Narendra Modi has responded by deploying troops, enacting a curfew and shutting down the internet. Violent police confrontations have followed; the police fatally shot several young men in Assam State, beat unarmed students with wooden poles in New Delhi, and used tear gas and batons to disperse protests elsewhere.

The citizenship law, which passed both houses of Parliament last week, was seen by critics as part of Mr. Modi’s broader push to transform India into a place where being Indian is synonymous with being Hindu. India, with a population of 1.3 billion, is about 80 percent Hindu and about 14 percent Muslim.

The law, paired with a citizenship test that has left nearly two million people in danger of being declared stateless, has Indian Muslims fearing they are being targeted at a time when there has been a surge of anti-Muslim sentiment.