Ten police in Rio de Janeiro have been charged with the torture and killing of a resident of the city's biggest favela in a case that has highlighted anger about extrajudicial killings.

For more than two months, Amarildo de Souza was simply classified as "missing", but the suspicious circumstances of his disappearance and the notorious record of Rio's police sparked demonstrations that forced the authorities to respond.

On Tuesday, 10 officers were detained on charges of torture and concealing a corpse. Local newspapers say they killed de Souza – who was an epileptic – during an interrogation that included the use of electric shocks and putting a plastic bag over his head.

The revelations are a major setback for government efforts to "pacify" favelas by using paramilitary forces to drive out drug-trafficking gangs and replace them with supposedly resident-friendly police units known as UPP.

All 10 of the accused were UPP officers in Rocinha, a shanty town that is home to tens of thousands of people.

The pacification programme is a key element of Rio's efforts to improve public security before next year's World Cup and the 2014 Olympics, but favela residents have long complained that the methods used by the police are excessively brutal.

The official number of deaths has since declined, but locals say the apparent improvement masks killings that go unreported or uninvestigated.

De Souza's family last saw him on 14 July, when he went to buy seasoning for the fish dinner he had bought for his wife and six children. They later learned that the bricklayer was rounded up in a police sweep of possible drug traffickers.

His wife, Elizabeth, said her husband had lived in the area without any problem for 43 years. She accused the police of "pure evil" and said they had tried to coerce her into dropping the case.

"I could have held my tongue, but I did not," she told local reporters. "I knew the truth would appear. Now I feel relieved. It will finally go to court."

Investigators are examining a body found last Friday and testing to determine whether it is de Souza's.

The former commander of the UPP in Rocinha, Edson dos Santos, is among those charged. It is alleged that he attempted to bribe witnesses to blame drug dealers for the killing.

He had already been switched from his post in an apparently unrelated reshuffle. The new head at the UPP command centre high up in the hills of Rocinha is Major Priscilla de Oliveira Azevedo, who oversaw Rio's first post-pacification operation at the Dona Marta favela.

By charging the alleged culprits and appointing such a prominent figure, the authorities appear to be listening to public frustration. Huge demonstrations – partly aimed at police violence – swept Rio and dozens of other cities in June. The de Souza case has subsequently prompted many more smaller protests in Rocinha. "Where is Amarildo?" is the slogan on many placards.

Prosecutors must now determine whether that question has been answered as they consider whether the case should go to court. That looks very likely, but most of the other 35,000 disappearances reported since 2007 go uninvestigated and the culprits unpunished.

Brazil's human rights minister, Maria del Rosario, said the latest case revealed the need to reform the military police – the heavily armed state-level security force that is in the vanguard of the pacification programme.

"What this investigation reveals is the necessity of changes so that the police are more focused, more accountable to citizens and not oriented towards criminal disregard for human rights," she said.