It was the biggest victory yet in a two-year effort to drive drug gangs from their strongholds in the hundreds of shantytowns, many draped across the hills around Rio's beaches, a crusade driven in part by the need to make foreign visitors feel secure for the final matches of the 2014 World Cup and for the 2016 Olympics that are meant to be showpieces of Brazil's emergence as growing world force.
The gangs, feeling threatened, reacted violently, mounting mass robberies of motorists on key highways, burning more than 100 buses and cars and shooting up police outposts.
The government counterattacked with hundreds of soldiers and thousands of police in armored vehicles, first driving the gangsters from the Vila Cruzeiro slum on Thursday, then neighboring Alemao — their most ambitious target yet — 72 hours later.
At least 36 people, mostly suspected drug traffickers, have died in the gang violence and resulting police raids in the past week.
Some residents said the government had a negligible presence in the area for at least a decade and feared it would not last.
"The gangs will be back. I have no doubt they escaped and will return after the police leave,"
The army in Brazil is to take on peacekeeping duties in the poor areas of Rio de Janeiro, which saw a week-long stand-off between security forces and drug dealers last month.Soldiers will patrol the Alemao and Penha districts to ensure hundreds of drug traffickers who had made the areas their stronghold would not return.
Security forces arrested more than 100 people during their sweep of the area.