Analysts and officials say the vigilante violence stems from a variety of problems with the police and the judiciary. India has a low number of police officers per capita, and those on the job are often poorly trained, unprofessional and corrupt. Morale is low thanks to meager pay, long hours and little or no vacation time.

The judicial system is in perpetual crisis, with more than 40 percent of high court judgeships unfilled. This has produced an enormous backlog of cases, leading to long delays during which witnesses may die, flee or simply disappear.

Moreover, policing in most states is governed by colonial-era laws that allow politicians to control the transfer and appointments of top officials. In practice, this means they are heavily politicized, influenced by governing-party politicians rather than evenhandedly enforcing the law.

“All political parties don’t think beyond their own importance and power, so they don’t reform the police,” said Julio Ribeiro, a former police commissioner of Mumbai. “It’s only when the people demand real reform that we will have it, and they haven’t done that yet.”

The problems have convinced many Indians, particularly the indigent and illiterate, that if they are to have any justice at all, they must take the law into their own hands.

In an interview, Uttam Verma, a survivor of one of the mob attacks last week, recounted the terrifying series of events. Mr. Verma, 31, said he and his younger brother, Vikas, had ridden a motorcycle into the village of Nagadih, on the outskirts of Jamshedpur, the steel-producing city where they live. They were looking for land to start a new business making septic tanks.

“A little into the village, the road was obstructed by a pipe, and the villagers were sitting around armed with bows and arrows, axes and swords,” Mr. Verma said.