In Uttar Pradesh, witnesses said that police officers tortured Muslim boys and shot Muslim men. At a predominantly Muslim university in New Delhi, the police beat unarmed students. Much of this was caught on video and widely shared.

But few have been punished. The message that many people took away, just as they had from the impunity enjoyed by the lynch mobs, was that when it came to targeting Muslims, the state would look the other way or maybe even join in.

Mr. Modi usually tries to stay above the fray, but he slipped up in December when he said that arsonists could be identified by “their clothes” — widely seen as a dig at India’s Muslims, who sometimes dress differently from Hindus.

Other B.J.P. leaders took it further. They vilified the protesters as agents of Pakistan, India’s archrival. One minister, Anurag Thakur, even led a chant at a political rally in which the audience yelled, “Shoot the traitors!”

“I honestly don’t know how you go from ‘Together for all, development for all,’ to chanting ‘Shoot the traitors,’” said Alyssa Ayres, a senior South Asia fellow at the Council of Foreign Relations. “A lot of Indians are wondering how this came to be.”

In the working-class, religiously mixed neighborhoods of northeastern Delhi, the tensions became combustible. On Feb. 23, a member of Mr. Modi’s party lit the spark.

That afternoon, Kapil Mishra, a B.J.P. politician who had just lost a state Assembly election and seemed to be trying to rejuvenate his career, threatened to clear out a group of peaceful Muslim protesters, mostly women, who had been blocking a road. Hindus and Muslims then started throwing rocks at each other, and the unruly crowd grew.