But locals said the energy did not change in Kasganj until last year, when Yogi Adityanath, a firebrand politician with ties to far-right Hindu nationalist groups, was chosen as chief minister of Uttar Pradesh, home to over 200 million people.

The clashes began with a flag. On Jan. 26, a group of Muslims gathered in an open square in Kasganj, unstacking rows of red plastic chairs and preparing to hoist a flag into the air to celebrate Republic Day, which marks the enactment of India’s constitution in 1950.

Around the same time, dozens of men on motorbikes affiliated with a far-right Hindu student group approached the assembly, asking that the Muslims move the chairs so they could pass. Accounts of what happened next vary.

According to a police report filed by Sushil Gupta, the father of Abhishek Gupta, the man who was actually killed, a group of Muslims began taunting the Hindus, shouting “Long Live Pakistan,” and telling them that they would have to chant “Hail Pakistan” if they wanted to pass.

Shamsul Arafeen, 70, a Muslim tailor who was part of the crowd, remembered the encounter differently, describing a “big mob” of Hindus who demanded that the Muslims move the chairs before boiling the argument down to religion. Others said the Hindus told the Muslims to go back to Pakistan.

“They started abusing us, saying, ‘If you want to live in Hindustan, you must chant ‘Hail Sita and Ram,’” Mr. Arafeen said, using another name for India and referring to two Hindu gods.

The confrontation became physical soon afterward, with rioters from both sides throwing stones at each other and burning shops to the ground. Videos of the confrontations spread rapidly. The authorities shut down internet service in the area for hours.