Violence broke out in a Rio de Janeiro slum after its residents lit fires and threw homemade explosives to protest the earlier death of a local.

At least one person was killed after gunfire was heard late on Tuesday in the Brazilian city when police officers moved into the Pavao-Pavaozinho slum, a few hundred metres from where Olympic swimming events are expected to take place in 2016.

It was the latest bout of unrest to hit one of Rio's "pacified'' slums - areas previously controlled by drug gangs but subjected to a security push by police in the run-up to this summer's World Cup. 

To date, 37 "police pacification units'' have been created, covering an area with a population of 1.5 million people. But there have been complaints of heavy-handed police tactics ending in the deaths of residents.

On Tuesday, the body of 25-year-old Douglas Rafael da Silva Pereira was discovered in the slum. 

"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 told Associated Press News Agency. "This effort to pacify the favelas is a failure, the police violence is only replacing what the drug gangs carried out before.''

"The circumstances surrounding the death of Douglas are under investigation. An on-site report indicates Douglas's injuries are compatible with a death caused by a fall," police told news agency AFP in a short statement. "Witnesses and residents will be called upon to give evidence," the statement added.

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

The ensuing violence led to a 30-year-old man being shot in the head. He died on arrival at a hospital, Globo's G1 web portal quoted health authorities as saying. It was unclear who shot him.

Source: Agencies