Violence erupted in a Rio de Janeiro slum following the killing of a popular local figure. Angry residents set fires and showered home-made explosives and glass bottles onto a busy avenue in the city's main tourist zone.

Intense exchanges of gunfire were heard when members of an elite police moved into the Pavao-Pavaozinho slum, which lies a few hundred metres from where Olympic swimming events are expected to take place in 2016.

point gun
A police officer takes aim during a violent protest in a favela near CopacabanaAFP

The rioting occurred after the body of 25-year-old Douglas Rafael da Silva Pereira was found. He was a well-known figure in the community, as he was a dancer on a TV show for Brazil's Globo network, the nation's largest channel. The circumstances of his death aren't clear, but residents blame police.

"The police beat my friend to death, just like they've tortured and killed in other communities," said Johanas Mesquita, a 23-year-old resident of Pavao-Pavaozinho. "This effort to pacify the favelas is a failure, the police violence is only replacing what the drug gangs carried out before."

A resident gestures during a protest in Pavao-Pavaozinho slum, in the Copacabana neighbourhood of Rio de Janeiro. Residents accused police peacekeeping officers of causing the death of a dancer, Douglas Rafael da Silva Pereira, 25, who was found dead at a school
A resident gestures during a protest in Pavao-Pavaozinho slum, in the Copacabana neighbourhood of Rio de Janeiro. Residents accused police peacekeeping officers of causing the death of a dancer, Douglas Rafael da Silva Pereira, 25, who was found dead at a schoolReuters
Police take position during a violent protest in a favela near Copacabana
Police take position during a violent protest in a favela near CopacabanaAFP
A policeman holds a rifle as a woman walks down the stairs
A policeman holds a rifle as a woman walks down the stairsAFP
A Brazilian Police Special Forces member aims his gun as a man walks past with his arms up
A Brazilian Police Special Forces member aims his gun as a man walks past with his arms upAFP

Following the discovery of the body, angry young men began lighting fires throughout the slum and tossing homemade explosives, bottles and other objects down onto Copacabana's main avenues.

Elite police units entered the slum, and at least three prolonged exchanges of gunfire were heard, presumably between officers and the drug gang members who continue to maintain a presence in the shantytown.

Brazilian Police Special Forces members run for cover during a violent protest
Brazilian Police Special Forces members run for cover during a violent protestAFP
Brazilian police patrol the Pavao-Pavaozinho slum, just a few blocks away from Copacabana Beach
Brazilian police patrol the Pavao-Pavaozinho slum, just a few blocks away from Copacabana BeachGetty
Policemen take up position next to barricades set on fire by residents of the Pavao-Pavaozinho slum
Policemen take up position next to barricades set on fire by residents of the Pavao-Pavaozinho slumReuters

Police began an ambitious security programme in 2008 to drive gangs from the slums and to set up permanent posts. It is part of Rio's overall security push ahead of the World Cup that begins this June and the Olympics the city will host in 2016.

So far, 37 such "police pacification units" have been created covering an area with a population of 1.5 million people.

But there have been repeated complaints of heavy-handed police tactics that have ended in the deaths of residents, and that is what set-off the latest clashes. More than two dozen police face charges from a high-profile case in a different shantytown, when investigators said a local man died while being tortured by police.

Police officers carry a wounded man during a protest by residents against the death of a man in Pavao-Pavaozinho slum
Police officers carry a wounded man during a protest by residents against the death of a man in Pavao-Pavaozinho slumReuters
A man is detained by police
A man is detained by policeReuters