NEW DELHI — The sit-in where women had gathered to protest a new citizenship law was gone, the posters torn and trampled. The mosque next door stood charred and silent, its floor smeared with blood. Stillness filled a major road, empty except for stray dogs picking their way through debris.

A tense calm settled on a swath of India’s capital Wednesday after a stunning outbreak of communal violence this week left more than 30 dead. The riots are the worst such clashes to hit Delhi in decades and came as President Trump made his first official visit to India.

Mobs of Hindus and Muslims had clashed on roads and alleyways in northeast Delhi, throwing stones and crude gasoline bombs. At least three mosques were torched, as were scores of homes and businesses. Witnesses said that instead of stopping the violence, police joined crowds shouting Hindu nationalist slogans and fired indiscriminately.

Communal violence over a controversial citizenship law in New Delhi has left at least 20 people, officials said on Feb. 26. (Reuters)

On Wednesday afternoon, Indian Prime Minister Narendra Modi ended days of silence on the riots. He issued an appeal for calm, urging people in Delhi to “maintain peace and brotherhood at all times” and restore normalcy.

This week’s violence marked the second time in Modi’s political career that he has presided over a significant episode of communal violence. In 2002, when he was chief minister of the state of Gujarat, more than 1,000 people were killed, mostly Muslims, in three days of riots. A court-appointed panel cleared Modi of involvement in the violence.

The riots in Delhi took place against a backdrop of rising tensions over a controversial citizenship law passed by the Modi government in December. The law creates a fast-track toward citizenship for migrants belonging to six religions, excluding Islam. Critics say the measure is unconstitutional and has stoked fears that Muslims will be treated like second-class citizens in Modi’s India. Protests against the law have erupted nationwide, with Indians of all religions taking part.

But Muslims have led the opposition to the law. Meanwhile, members of Modi’s ruling Bharatiya Janata Party have vilified the protesters, calling them traitors who deserve to be shot and linking them with India’s rival Pakistan. One such leader, Kapil Mishra, helped trigger this week’s violence: He threatened to clear a sit-in conducted by Muslim women, sparking a clash between supporters and opponents of the citizenship law.

The way the police responded to the violence in Delhi points to a troubling conclusion, said Ashutosh Varshney, a political scientist at Brown University who has researched communal clashes in India. “The cops either looked away or participated,” he said. That means there was “state connivance and state culpability — it’s a pogrom,” Varshney said.

M.S. Randhawa, a spokesman for the Delhi Police, told reporters Wednesday that “sufficient force was deployed” in the northeastern part of the city, and additional paramilitary personnel were brought in to assist. The “situation is under control,” he said.

In the afternoon, Ajit Doval, India’s national security adviser, toured a riot-hit area on foot to reassure residents. An agitated young woman in a burqa who said she was a student approached him. “We’re not safe,” she said. “You don’t have to worry,” he responded. “I give you my word.”

On Tuesday, as Trump commended Modi for his “incredible” efforts to uphold religious freedom at a news conference in central Delhi, violence was erupting in the northeastern part of the city.

In Ashok Nagar, about 200 men chanted Jai Shri Ram or Victory to Lord Ram, a rallying cry of Modi’s ruling party, as they vandalized and torched a row of shops, said Avichal Dubey, a journalist for the Wire who witnessed the scene. Some climbed the minaret of a mosque, broke off a loudspeaker and hoisted a Hindu nationalist saffron flag.

Rioters vandalized a mosque and placed a Hindu nationalist banner atop its minaret as violence raged in northeastern Delhi on Feb. 25. (Avichal Dubey)

Shehzad Khan, 48, manages a small clinic in the area of Brij Puri. Normally his patients come in complaining of fevers or coughs. On Tuesday, three people arrived with gunshot wounds and more than a dozen with injuries from hurled stones. Groups of men carried in two dead bodies, Khan said, one with a gunshot wound to the head and the other charred in a fire.

Residents described violent confrontations between groups of Hindus and Muslims near a main road that separates a Hindu-dominated area from a Muslim-dominated neighborhood. One Muslim family carrying bags of luggage hurried across the main road from the Hindu side to the Muslim side.

“We only had time to carry a blanket and one pair of clothes each,” said Ayesha Salmani, 32, as she clutched the hand of her young daughter. Salmani said they fled their home as soon as they felt it was safe to leave.

Mohammad Abbas is the 85-year-old caretaker of the small Farukhiya mosque in the same area. After evening prayers Tuesday, he said that police officers attacked him and the mosque’s imam. He said they called him a traitor, and he saw them vandalizing and setting fire to the mosque. When he was taken to a hospital, he said he was covered in blood. “They beat me so mercilessly, my hands were broken,” Abbas said.

Randhawa, the police spokesman, denied the allegations but said that the authorities would take action if evidence were provided.

Outside the mosque, it was hard to believe this was India’s bustling capital. The area looked like a war zone: Acrid smoke drifted from a school that was burned and vandalized, and empty roads were littered with broken bricks and burned-out vehicles. Inside the mosque, the walls were blackened with soot, and charred books lay scattered on the floor. On the roof, an Indian flag fluttered weakly in the breeze.

Tania Dutta contributed to this report.