Standing in the shadow of Delhi’s historic red fort, SA Khan pushed angrily against the wall of police barricades blocking his way. Khan, like thousands of others, had planned to take part in a peaceful march through the capital to voice his opposition to India’s new citizenship law, but the authorities had other plans.

“They are denying us our basic right to protest, so how can we still call India a democracy?” said Khan. “Modi has underestimated the Indian people if he thinks he can tear apart our constitution and try to divide us all down religious lines with this citizenship act. We stand here today united as Indians, Muslim brothers with Hindu brothers, and we will stay out here on these streets until the citizenship act is revoked and Modi is on his knees.”

After a week of nationwide protests, some of the largest in India for almost four decades, Narendra Modi’s government had banned gatherings of more than four people in turbulent areas across the country in an attempt to quell dissent. But thousands of protesters – Hindu and Muslim, young and old, farmers, students and academics – were not to be stopped.

On the streets of Delhi, Bangalore, Lucknow and elsewhere, demonstrators took to the streets in droves for peaceful protests in breach of the section 144 orders. Police responded with force, brandishing batons and rounding up all those participating in civil disobedience. More than 1,000 people were detained in Delhi, and in Bangalore police did not have enough buses to transport all those they had arrested. Police jails began to overflow.

One arrest in particular prompted horror. Footage of one of India’s most eminent historians, Ramachandra Guha, being carted off by police officers went viral. He had been standing peacefully on a street in Bangalore brandishing a picture of B.R. Ambedkar, the architect of the Indian constitution.

“It’s the sign of a paranoid, insecure regime who can not deal with dissent in any way,” Guha said after he was released from detention. “We’ve had difficult times in our republic but this is one of the worst I’ve seen in my 60-year lifetime.”

The unrest was sparked by the passing of citizenship law that many believe brazenly discriminates against Muslims and could tear apart the secular foundations of India.

The law states that all Hindu, Christian, Jain, Buddhist and Sikh migrants who arrived from Bangladesh, Pakistan and Afghanistan before 2014 will be allowed to claim Indian citizenship. The same will not apply for Muslim immigrants.

Facebook Twitter Pinterest Protesters in Delhi. Photograph: Altaf Qadri/AP

The government has defended the legislation as a benevolent act meant to offer protection to Hindus who have faced persecution in neighbouring Muslim-majority countries. But put into the context of decades of discriminatory rhetoric and actions perpetrated by Modi, his home minister, Amit Shah, and their political party, the BJP, the motives have been seen by many observers as sinister.

Modi’s rise to power was built on religious polarisation, fomenting anti-Muslim sentiment and the oppression of dissent, critics say. As chief minister of Gujarat, in 2002 he was accused of allowing or even encouraging the massacre of thousands of Muslims when sectarian rioting and violence broke out in the state.

A new India is emerging, and it is a country ruled by fear | Amit Chaudhuri Read more

“This is how Modi ran Gujurat, with a completely iron fist,” said Guha. “They manipulated universities, they intimidated the media, threatened the judiciary – and they think they can extend that to all of India. This regime hates Muslims and now, more clearly than ever, it is exposed for what it is: authoritarian and sectarian and spectacularly bigoted.”

When Modi came to power in 2014, his government began enacting what looked to many to be a Hindu nationalist agenda that aimed to recast India as a Hindu nation rather than a secular one as laid out in the constitution.

For the first five-year term, this manifested mainly in sectarian rhetoric and the assertion that to be Indian was to be Hindu. But after Modi’s re-election in May, when he won a huge parliamentary majority, the agenda picked up the pace.

First came the revocation of the special status of the Muslim-majority state of Kashmir. Then, in November, the supreme court ruled that India’s most hotly contested religious site, Ayodhya – which Hindus regard as the birthplace of Rama and where a 16th-century Mughal mosque was demolished in 1992 – belonged to just Hindus rather than both communities, which Modi’s government claimed as a political triumph.

The brazenness of the citizenship law has galvanised the masses in opposition in a way that public lynchings of Muslims, low-level sectarian violence and the Kashmir decision all failed to do.

“This citizenship legislation is at the core of their Hindu nationalist project, where the relegation of Muslims to second-class citizens is fundamental,” said Niraja Gopal Jayal, a professor at the Centre for the Study of Law and Governance, at India’s Jawaharlal Nehru University.

“In Modi’s first term you saw it gradually through the fostering of an ecosystem that was hostile to Muslims, where for example those who carried out vigilante lynchings of Muslims could act with complete impunity.

“But in the past six months, the alacrity with which they have escalated the Hindu nationalist project, first with revoking article 370 in Kashmir, then banning the triple Talaq [an instant divorce allowed in Islam], then the favourable verdict for the Ram Mandir [the temple in Ayodhya], there is this sense that they are on a roll and can accomplish whatever they want.

“So this legislation, where Muslims will be lucky if they are counted second-class citizens and not just thrown in a detention centre, is an inevitable culmination of that project. But judging by the protests, it is also possible that this time they have gone too far and never anticipated this kind of response.”

Facebook Twitter Pinterest Historian Ramchandra Guha (R) holds a placard against India’s new citizenship law. Photograph: Manjunath Kiran/AFP via Getty Images

Jayal said the demonstrations were part of “a battle for democracy, a battle for civil liberties, a battle for secularism and the plural character of Indian society.”

For one of the first times since Modi came to power, his slick social media and spin operation has failed to shift the narrative in his favour. The diverse makeup of participants in the protests means Modi’s attempts to dismiss them as self-loathing liberals and hopeless cosmopolitans have been met with derision.

“I think Modi and Shah had grown so over-confident, had grown so arrogant that they thought they could get away with it, because they were convinced they had consolidated the country around the idea of a Hindu majority nation, and the country and the media would go with them,” said Kapil Komireddi, the author of Malevolent Republic: A Short History of the New India. “But they did not bank on this outpouring of resentments that has accumulated over a long time.”

Like many observers, Komireddi drew comparisons between this week’s unrest and the protests that preceded Indira Gandhi declaring a state of emergency in 1975 and suspending the constitution. “What we are living in now is already a kind of undeclared emergency, where in effect in many parts of India democracy has effectively been suspended by Modi’s government,” Komireddi said.

Nonetheless, he remained optimistic about the sea change occurring across India in the wake of the citizenship act. “In 2014 India was the first democratic country to succumb to this wave of populism,” he said, “and now India will be the first country that will show the way to reclaim democracy from the clutches of these thugs.”