NEW DELHI — Tens of thousands of protesters rioted in three states across India’s northeast, some defying a government curfew and military deployment to demonstrate against the passage of the contentious Citizenship Amendment Bill, which will grant citizenship to thousands of migrants on religious grounds.

By Thursday night, the government had shut down the internet, deployed hundreds of troops, imposed a curfew in Assam state and banned groups of more than four people from assembling in neighboring Meghalaya state.

The police shot and killed two protesters in Assam whom they accused of defying the curfew, and arrested dozens of others there, The Associated Press reported.

Protesters are angry that the bill will grant citizenship to thousands of Hindu, Christian, Jain, Buddhist and Sikh migrants from some neighboring countries where New Delhi says they are religiously persecuted. Demonstrators say this will flood their hometowns with unwanted foreigners.