The Indian prime minister Narendra Modi’s Hindu nationalist party has lost a key state election, a setback for the party as it faces huge anti-government protests against a new citizenship law.

According to results announced by country’s Election Commission late on Monday, the Bharatiya Janata Party, or BJP, yielded power to an alliance forged among the opposition Congress party and powerful regional groups in eastern Jharkhand state, where the voting took place this month.

The election was held amid protests calling for the revocation of the citizenship law, which critics say is the latest effort by Modi’s government to marginalise India’s 200 million Muslims.

BJP leaders said on Tuesday that the citizenship law was not an issue in the Jharkhand election, but Congress party leader RPN Singh said the results were a snub to Modi’s party, which won only 25 of 81 state legislature seats. The Congress party and its allies won 47 seats, ending the BJPs five-year rule in the state.

Since December 2018, the BJP has lost power in five states: Madhya Pradesh, Rajasthan, Chhattisgarh, Maharashtra and Jharkhand. But Modi won a major victory for his party in May national elections. The BJP came to power in 2014, defeating the Congress party.

Modi has defended the new citizenship law and accused the opposition of pushing the country into a fear psychosis.

The law allows Hindus, Christians and other religious minorities who are in India illegally to become citizens if they can show they were persecuted because of their religion in Muslim-majority Bangladesh, Pakistan and Afghanistan. It does not apply to Muslims.

Tens of thousands of protesters have taken to Indias streets to call for the revocation of the law.

Twenty-three people have been killed nationwide since the citizenship law was passed in parliament this month in protests that represent the first major roadblock for Modi’s Hindu nationalist agenda since his party’s landslide re-election in May.

Narendra Modi has accused the opposition of pushing the country into a ‘fear psychosis’. Photograph: Altaf Hussain/Reuters

Most of the deaths have occurred in the northern state of Uttar Pradesh, where 20% of the state’s 200 million people are Muslim. The state government is controlled by the BJP.

On Tuesday, hundreds of students marched through the streets of New Delhi to Jantar Mantar, an area near parliament designated for protests. They walked behind a banner that read “We the people of India”.

Vipul Kumar Chaudhary, a student, said the purpose of the march was to ensure that there was no discrimination on the basis of religion. “India is a bouquet of people representing different religions. We want to preserve it,” he said.

Also on Tuesday, police stopped Congress party leaders Rahul Gandhi and his sister Priyanka Gandhi from visiting Meerut, a town in the northern state of Uttar Pradesh where massive clashes took place on Friday between police officers and protesters. They were turned back from the outskirts of Meerut, 45 miles northeast of New Delhi, Rahul Gandhi told reporters.

Modi’s government, meanwhile, announced details on India’s 2021 census, an exercise carried out every 10 years.

Prakash Javadekar, the information and broadcasting minister, told reporters that the census would begin this April, ending with a head count in February 2021 to prepare a national population register.

He said it would be a self-declaration exercise, requiring no residential proof, documents or biometric identification. The country’s current population is around 1.3 billion. Authorities across India have taken a hardline approach to quell the protests.

They have invoked a British colonial-era law banning public gatherings, and internet access has been blocked at times in some states. The Ministry of Information and Broadcasting has asked broadcasters across the country to refrain from using content that could inflame further violence.

The communication shutdown has mostly affected New Delhi, the eastern state of West Bengal, the northern city of Aligarh and the entire northeastern state of Assam.