Security officials said the giant Rocinha favela in Rio de Janeiro was back under control Saturday after hundreds of soldiers and police were sent to battle heavily armed drug traffickers.
Five suspected gang members were arrested overnight, while a gang leader in another favela was arrested, along with a haul of semi-automatic rifles, police said.
Although shooting was reported in the early hours of Saturday in Rocinha -- for the seventh day running -- officials said that Friday's deployment of 950 soldiers to reinforce police had brought the crisis under control.
"There's a stability that is being maintained," Rio de Janeiro state security chief Roberto Sa told a press conference.
General Mauro Sinott said the troops, who intervened after police admitted they were unable to cope with the chaos, would stay as long as needed.
"We have no deadline for leaving," he said.
The soldiers arrived Friday in convoys of trucks and armored personnel carriers. They are tasked with encircling Rocinha while police and special forces personnel hunt suspects inside.
With an official population of 70,000 and unofficial estimates running as much as three times higher, Rocinha is a sprawling, densely packed neighborhood of small homes on the hills overlooking Rio's posh Leblon district.
Well organized drug gangs have long held sway in an uneasy coexistence with outgunned police. The status quo however collapsed last Sunday when a rival gang entered in an attempt to take over.
Around a quarter of Rio's population of around 6.5 million live in favelas. The tight-knit neighborhoods are home mostly to working class people, but have suffered from decades of being ignored by the government, creating vacuums filled by gangs.
Sa called the army-backed security operation a "big opportunity" to root out previously untouchable gunmen.
However, Sinott warned that when the military does leave, Rocinha residents will have to close ranks to prevent the gunmen from immediately reestablishing their old ways.
"They're the people who can help us clean out the community for a long time," he said. "They have to overcome their fear."