NEW DELHI — Fresh protests swept India on Monday, a day after police entered a university campus in the nation's capital and injured hundreds of students who were expressing opposition to the country's controversial new citizenship law.

Students said Delhi police officers beat them with batons, hurled insults and fired tear gas canisters inside the campus after a march outside the university gates turned violent.

New demonstrations took place in at least 17 cities on Monday. The protests are part of a wave of unrest that has gripped India following the passage of the citizenship law on Dec. 11. The measure was a priority for Indian Prime Minister Narendra Modi, who won reelection in May and has moved to implement his party's agenda of emphasizing Hindu primacy in India.

The law introduced religion as a criterion for nationality for the first time and created an expedited path toward citizenship for migrants who belong to six religions — excluding Islam, the faith practiced by 200 million Indians.

Opponents say the measure is unconstitutional and marks a break with India’s founding ethos of secularism. The government says the objective of the law is to ease the hardships of persecuted religious minorities who illegally entered India from Pakistan, Bangladesh and Afghanistan.

Some of the protesters view the law as inherently discriminatory, while others — particularly in India’s northeast — fear it will accelerate demographic and linguistic change. Four people were killed by police gunfire in the northeastern state of Assam during protests there against the law.

On Monday, Modi wrote that the recent “violent protests . . . are unfortunate and deeply distressing.” He appealed for calm and appeared to blame the demonstrations on his political opponents. “We cannot allow vested interest groups to divide us and create disturbance,” he said.

Speaking at a rally on Sunday, Modi said the protesters who were setting fires “can be identified by their clothes.” Critics called the statement a political dog whistle to refer to Muslims, who often wear distinctive garb.

Amit Shah, Modi’s powerful second-in-command, has repeatedly stated that the citizenship law will be followed by a nationwide registry in which all Indians will have to provide documents proving their citizenship, ostensibly to identify migrants who entered the country illegally.

Now the reaction by law enforcement to the protests is spurring further demonstrations, raising the prospect of continued unrest. On Sunday, a protest near a university in New Delhi turned violent, with protesters throwing stones at police. Four buses and dozens of motorcycles were set on fire.

The police beat protesters with batons and fired tear-gas as the officers entered the university. A spokesman for the Delhi police, M.S. Randhawa, told reporters Monday afternoon that police personnel had used “maximum restraint” and “minimum force.” Two dozen police officers were injured in the clash.

Najma Akhtar, vice chancellor of Jamia Millia Islamia University, told reporters that police had entered the campus without the permission of university authorities and that about 200 students were injured. The university’s students are primarily Muslims.

A doctor at Delhi’s Safdarjung Hospital told The Washington Post that two protesters were brought in with bullet wounds. One was shot in the chest and the other in the foot, said the doctor, who spoke on the condition of anonymity because he feared harassment by the police. Four police officers escorted the two young men “like prisoners,” he said, adding that both were in stable condition after treatment.

Social media was awash with videos showing police attacking unarmed students. In one viral video, a group of young women try to shield a young man from stick-wielding police officers who repeatedly beat him. Another widely shared video shows students in a university library taking cover as smoke fills the room. The assault on a college campus shocked many in Delhi, who could not recall a similar incident in recent times.

Iman Usmani, an 18-year-old student, was participating in a march Sunday when the crowd came upon a large number of police officers, who began striking people with batons and firing tear gas canisters. One of the canisters burst right next to her, Usmani said, and she fainted.

“I could not breathe. Some students rubbed salt on my face,” she said. “Police went inside the campus, hitting people and lobbing tear gas shells at the canteen and library.”

Ishita, a 21-year-old student who asked to be identified only by her first name because she feared reprisals by the police, said she was on campus as others clashed with police outside. Then tear gas canisters started to land inside the gate.

Eyes and throat burning, she and other students began running toward the main library. Police officers chased them, she said, yelling insults — “sluts,” “Pakistanis,” “traitors” — and beating anyone they could with long sticks. She said she hid in a bathroom upstairs in the library, not daring to move.

Umar Ashraf, 24, was inside a reading room on campus when he said he heard the sound of tear gas canisters being fired.

“You couldn’t see anything. The air was full of smoke,” he said. “Students were running helter-skelter.” One of his friends who hid inside a bathroom was dragged out and beaten by police. Ashraf said he ran out through a back lane to save himself.

“They were hitting people as though they were beating a drum,” he said.

Tania Dutta contributed to this report.