Two people were killed in a favela that straddles the hill between Ipanema and Copacabana, the tourist neighbourhoods where tens of thousands of visitors are expected to stay during the World Cup in June and July.
The violence began on Monday after a dancer on a well-known television show was killed in the Pavao-Pavaozinha favela.
Violent protests erupted from favela residents, who blamed police for his death. They burned rubbish, set up barricades and blocked roads in and around the streets leading into the area.
Police fired shots, killing another man.
However, FIFA Secretary General Jerome Valcke said the scenes could happen anywhere and pledged they would not affect football fans.
"The way you talk about it it's as if there was a revolution," Valcke told a reporter who asked about the unrest.
"I never had any doubt that security for the World Cup would be put at risk. I am sure the security during the World Cup will be as high as possible. It's possible that something happens but that could happen in any country."
Tens of thousands of police have been trained to cope with violent protests following the mass unrest during last year's Confederations Cup in Brazil.
More than a million people all across the country took to the streets to protest the huge expenditure on stadiums and the lack of investment in public services.