Daniel Berehulak/Getty Images

NEW DELHI— Protests over a recent gang rape quickly gained force over the weekend, tapping into longstanding fury against entrenched corruption and lopsided justice, and leading to clashes with the police.

Seven days of demonstrations peaked Sunday, as thousands of people joined women’s and students’ groups despite a hastily enacted ban on protesting in New Delhi. The crowds taunted the police and attacked the car of a member of Parliament. The police, in turn, fired tear gas and water cannons, beat protesters with bamboo sticks and arrested dozens.

“Many students who were protesting peacefully were attacked,” said Jayati Ghosh, a professor of economics at Jawaharlal Nehru University, who had joined the protest with her daughter. “These are patriotic and respectable citizens. You cannot respond to them in this ham-handed manner.”

Kulsoom Rashid, 27, rubbed her eyes and said she had been tear-gassed. “This is how they are responding,” she said, seething. “Hundreds of rapists are running scot-free, and the entire Delhi police is standing here to stop people like me?”

By late afternoon Sunday, political parties had joined the crowd, increasing the number of confrontations with the authorities. Protesters overturned a car, and clashes became fierce.

After several recent, highly publicized rape cases, India has been struggling to come to grips with the scale of the vastly underreported problem. Even when rapes are reported, suspects are rarely found and arrested.

In the most recent case, a 23-year-old medical student who boarded what she thought was a public bus on Dec. 16 was brutally raped and beaten nearly to death by a group of men. Six suspects are in jail.

The rapid reaction has done little to stem public anger. On Sunday, protesters jostled with the police, calling them “cowardly,” “corrupt” and “inept,” as they tried to push through the cordon.

“Why don’t you come and join us?” one agitated protester asked a senior police officer. “Aren’t you angry at what happened?”

The crowd swarmed over the India Gate monument in the city center and were prevented from marching on the Rashtrapati Bhavan, or presidential palace, only by the intervention of hundreds of police officers, many of them from the country’s elite Rapid Action Force.

“These people have lost patience with a government that has no sense of justice, no sense of accountability and is totally corrupt at the top,” said Prem Shankar Jha, a former editor of the Hindustan Times.

Corruption has become a dominant political theme in India in the past several years, starting with the Anna Hazare movement of 2011 and continuing this year with the creation of a political party by one of Mr. Hazare’s former disciples, Arvind Kejriwal.

The protests on Sunday recalled demonstrations in 2011, with the focus shifted from government corruption to the difference in security between the elite and the rest of India.

“These people see that the cops are only protecting the ministers and the top bureaucrats, while the average person on the street, she feels very vulnerable,” said Paranjoy Guha Thakurta, a political analyst and commentator.

Some experts say that the gap is undermining claims of legitimacy by the authorities.

“The consistent thing we have been seeing for the last couple of years is that people have come to believe that the state has become an instrument largely for the benefit and protection of a few — and mostly politicians,” said Pratap Bhanu Mehta, president of the Center for Policy Research in New Delhi. “That momentum is producing an open contempt of the state.”

Just to reach the protest sites, the crowds defied multiple government efforts to keep them away. Officials had shut down many central subway stations, curtailed bus service, diverted traffic and even invoked a law making it illegal for more than a few people to gather. Dozens who had camped overnight at protests sites were arrested and dragged away. Top government officials pleaded on national TV Saturday night for people to stay away.

The protest organizers demanded that the courts speed the progress of about 100,000 rape cases; that the police to pledge to register rape complaints promptly; that Parliament hold a special session to strengthen laws on rape, sexual harassment and child abuse; and that the Delhi police commissioner be fired for his handling of the protests.

The demands offer a hint of the deep distrust with which most Indians regard the police.

“If there is one state institution that people fear and distrust the most, it’s the police,” Mr. Mehta said. “A lot of people, particularly women, find police more fearsome than the guys out there on the street.”

There are more than 80,000 human rights complaints filed in India against police officers every year, according to Mr. Jha, the former Hindustan Times editor. That represents a small fraction of the actual number of crimes committed by officers, he said, most of which are sexual assaults against women.

Sruthi Gottipati contributed reporting.