NEW DELHI — The upper house of the Indian Parliament passed a contentious citizenship bill on Wednesday, bringing a religiously polarizing measure one step closer to law as new protests erupted across the country.



The measure, called the Citizenship Amendment Bill, uses religion as a criterion for determining whether illegal migrants in India can be fast-tracked for citizenship. The bill favors members of all South Asia’s major religions except Islam, and leaders of India’s 200-million-strong Muslim community have called it blatant discrimination.



The Rajya Sabha, India’s version of a senate, approved the bill in a 125-to-105 vote. It next goes to the president’s desk, where it is expected to be signed into law in the coming days.

Opponents of the legislation in India and international rights groups have called the bill a major blow to India’s long-held commitment to a secular democracy. Officials in Prime Minister Narendra Modi’s government have insisted that the legislation would protect human rights.

[Update: Modi urges calm as New Delhi violence rages for third day.]

“The bill provides expedited consideration for Indian citizenship to persecuted religious minorities already in India from certain contiguous countries,” said Raveesh Kumar, a spokesman for the Foreign Ministry. “It seeks to address their current difficulties and meet their basic human rights. Such an initiative should be welcomed, not criticized by those who are genuinely committed to religious freedom.”

The bill is a central piece of a far-reaching agenda by Mr. Modi and his Bharatiya Janata Party, which has long espoused a Hindu-centric worldview.