Brazil's army says it's dispatching nearly 1,000 troops to the country's largest shanty-town – or "favela" – in the hope of ending a wave of deadly violence that began nearly one week ago.

This afternoon military trucks carrying soldiers brandishing assault weapons began rumbling up to the edge of Rocinha, a sprawl of tumble-down hillside homes, shops, narrow streets and tiny alleys in the south of Rio de Janeiro.

Trouble erupted within the favela early last Sunday, with a five-hour firefight during which residents say they were forced to dive for cover on the floors of their homes as several hundred well-armed gangsters roamed the streets.

The favela – home to an estimated 100,000 people — remained tense in the days that followed, echoing sporadically to the sound of gunfire, and also fireworks set off by the gangsters to warn each other of the approach of the military police.

Thousands of Rocinha's children had to stay home this week, because their schools shut down.

"My son gets really frightened," said Gilvan Esteves dos Santos, a Rocinha resident who has a 13-year-old. "He sees these armed guys passing by. We have to hide him, and keep him down on the floor to make sure he isn't hit with a stray bullet."

Brazilian media reports say the conflict stems from an internal feud over the leadership of the criminal organization – the so–called "Amigos dos Amigos" gang that controls the local narcotics trade — in which a notorious drug lord, who's in prison, is fighting a rival.

The favela is near a major transport route to south Rio that's currently being used by many thousands of people heading to the "Rock In Rio" festival, where some of the biggest names in international music are performing in the city's Olympic Park. Bon Jovi, Guns N' Roses, The Who and the Red Hot Chili Peppers are among those on this weekend's bill.

Brazil's Defense Minister Raul Jungmann told reporters that the armed forces are deploying 950 troops to encircle the favela in response to a request from the state government of Rio de Janeiro. There have been at least four deaths because of the fighting within the favela in recent days.

Jungmann is proposing the creation of a federal task force to combat what he describes as "a parallel state that exists today in Rio," according to Brazil's UOL News.

Rio's police launched a "pacification" program as part of a drive to push out drug gangs from the favelas, and establish peace ahead of the 2014 soccer World Cup and last year's Olympic Games.

This has unraveled. Analysts say it's partly because the state government is bankrupt and has failed to pay police salaries on time, but also because of a political crisis in which a large number of Brazil's political leaders have been exposed as corrupt.

Copyright 2017 NPR. To see more, visit