Even before lawmakers in the Lok Sabha voted, protests were breaking out.

In Assam, where the citizenship program began last summer, thousands of people have marched in the streets, hoisting placards and torches and shouting out their opposition to the bill.

People are talking of mass fasts and boycotts of schools and markets. On Monday, some hanged effigies of Mr. Modi and his right-hand man, Amit Shah, the home minister.

The leaders of the opposition Indian National Congress party are trying to paint the bill as a danger to India’s democracy. After India won its independence, its founding leaders, Mohandas K. Gandhi and Jawaharlal Nehru among them, made a clear decision: Even though the country was 80 percent Hindu, it would not be an officially Hindu nation. Minorities, especially Muslims, would be treated equally.

Rahul Gandhi, a party leader and great-grandson of Mr. Nehru, said, “India belongs to everybody — all communities, all religions, all cultures.” Shashi Tharoor, the party’s intellectual heavyweight, called the bill an “all-out assault on the very idea of India.”

But the Congress party is at a low point in its 100-year-plus history. And Mr. Modi’s party has the numbers: With allies, it controls nearly two-thirds of the seats in the lower house.

Some of Mr. Modi’s critics believe the bill is serving to distract the public from another pressing issue: the economy. For the first time in decades, India’s economy is slowing significantly. It is still huge, but several big industries, like car and motorcycle manufacturing, have seen sales plummet like never before.

“The economy is in tatters,” said Aman Wadud, a human rights lawyer in Assam. The bill, he said, was “the only issue left to polarize the country and distract people.”