PM Modi's party is reaching out for help in defusing the crisis over the new citizenship bill. (Reuters)

The government did not anticipate the protests against a new citizenship law that have raged across the country and is now scrambling to control the damage, members of the ruling BJP have said.

In Prime Minister Narendra Modi's biggest challenge since taking office in 2014, hundreds of thousands have protested against the law offering citizenship to immigrants from non-Muslim minorities who have fled Afghanistan, Bangladesh and Pakistan. At least 21 people have died in clashes with police.

The BJP leaders were taken aback by the backlash, some party members told Reuters. They said they had been prepared for some anger from Muslims, but not the widespread protests that have convulsed most major cities for two weeks.

Now the party and the government are reaching out for help in defusing the crisis to allies and opponents sidelined when the bill passed earlier this month, the sources said.

"I really did not see the protests coming... not just me, other BJP lawmakers were also unable to predict this kind of anger," Union Minister Sanjeev Balyan told Reuters.

While there is no threat to his big parliamentary majority, PM Modi's reputation as a master strategist with his finger on the pulse of the people has taken a hit. Publicly, his government has prioritised development, seeking to make India a $5 trillion economy by 2025.

Outrage at the citizenship law has been fanned by resentment against the government for not addressing an economic slowdown and loss of jobs.

Protests against the new citizenship law in Delhi earlier this month.

Many Muslims fear the new law - and a planned national citizenship register - could make the minority second-class citizens. Students, politicians and rights activists, both Hindus and Muslims, have also taken to the streets, saying PM Modi, 69, is jeopardising India's secular Constitution.

The government denies the citizenship register is imminent and says none of the changes will affect existing citizens.

Three other BJP lawmakers and two Union Ministers, who spoke on condition of anonymity, said they were mobilising party supporters from all walks of life to start community dialogues and dispel discontent over the law and the register.

"I believe that the political math behind the clearance of this law was not taken into account," said one of the Union Ministers, an apparent reference to lack of consultation with allies and opposition parties.

Home Minister Amit Shah repeated in a television interview on Tuesday that Muslims had no cause for worry. "We are all in damage control mode," said the other Union Minister, adding that the BJP and allies have launched a campaign to explain that the law is not discriminatory.

The Rashtriya Swayamsevak Sangh (RSS), which is the ideological parent of the BJP, has also launched a movement across urban slums to counter opposition to the bill.

"The violent protests are not because the people were not properly informed about the new law, but because they were intentionally wrongly informed by forces with vested interests," Manmohan Vaidya, a senior RSS leader, told Reuters.

Movement by BJP's students' wing to counter opposition to the new citizenship bill.

Analysts say various reasons for discontent were coalescing.

"It's evident that people are protesting against the law and also venting against Modi's autocratic style of leadership," said Sanjay Kumar, director of research institute the Centre for the Study of Developing Societies. "The economic crisis gives further incentive... I don't see these protests fading very soon."

When PM Modi, a veteran politician, came to power five-and-a-half years ago, he promised growth, jobs and development. But he was criticised for haphazard tax reform and shock demonetisation of high value currency notes in his first term - which contributed to an economic slowdown - as well as intolerance for dissent and ignoring anti-Muslim hate crimes.

Nevertheless, he was re-elected with an even stronger majority earlier this year.

"I feel they can't create jobs and hence they are passing such a disturbing law," said Ghanshyam Tiwari, a student protesting in the city of Lucknow this month.

The protests are backed by the opposition Congress party. It said the gloves were off between secular India and PM Modi's agenda.

"For the first time in India's history a law has been framed on the basis of religion," Prithviraj Chavan, a senior Congress leader, told Reuters. "The ruling party's strategy to make India a Hindu-first nation has backfired."