Police were expected to remain in Paraisopolis indefinitely
Brazilian riot police have occupied a shantytown in Sao Paulo, following a night of violence there.
Some 230 officers were patrolling the slum supported by dozens of armoured vehicles and two helicopters, in one of the biggest operations in years.
Earlier police had clashed with youths rioting after police killed a suspect.
Meanwhile, President Luiz Inacio Lula da Silva announced a plan to build 500,000 low income homes while visiting a shantytown in Rio de Janeiro.
The president, speaking during a visit to the city's Manguinhos shantytown, said the plan would help create jobs.
In Sao Paulo, Brazil's main city, the police occupation of the crowded Paraisopolis shantytown came after a night of running battles between security forces and groups of young men.
The protesters had set cars and tyres on fire to blockade streets in the slum, which is home to about 80,000 people and sits next to some of the city's richest neighbourhoods.
Brazilian TV showed some rioters using fireworks as weapons, and some businesses and cars were reportedly looted.
The police operation that followed was the biggest since 2006, correspondents say.
The rioting began after police shot dead a suspect who they were trying to arrest, officials said.
Three policemen had been shot and injured during the clashes and several people were arrested, they said.
The situation had returned to calm on Tuesday, although some burning cars were seen and police were expected to remain indefinitely.
"It is under control in the sense that the most serious and pressing issues have been resolved," said Sao Paulo's public security secretary, Ronaldo Mazargao.