VARANASI, India — Nidhi Tiwari is an upper-caste Hindu. She voted for India’s prime minister, Narendra Modi, in the last election. She lives in Mr. Modi’s constituency, Varanasi, a holy Hindu city. She was, up until last week, one of the millions of bricks in his base.

But Ms. Tiwari, a university student, has turned against Mr. Modi, joining the growing protests sweeping this country after he pushed through a contentious citizenship law that more and more Indians see as anti-Muslim and a blow to India’s foundation of tolerance and secularism.

“I used to see Modi as a strong leader, as the person India had been waiting so long to get,” Ms. Tiwari said. “Now, I see him as a monster.”

Until this outpouring of anger, Mr. Modi seemed unstoppable. Riding a populist wave, he was pushing ahead with plans to bring India closer to becoming a Hindu homeland, a divisive dream harbored by his political party whose roots lie deep in a Hindu-centric worldview that poses an existential threat to India’s large Muslim minority.