Sao Paulo prison authorities said the final two rebellions were brought under control late on Monday. The office of prisons said riots were controlled in 45 prisons and police stations, and 195 hostages were freed.
But heavily armed police continued to guard the deserted streets of South America's largest city throughout the night, after four days of unprecedented gang attacks that left at least 81 people dead and terrified Sao Paulo's 18 million residents.
"We're at war with them, there will be more casualties, but we won't back down," state military police chief Colonel Elizeu Teixeira Borges said of the gangs that launched a spree of attacks on police stations, bars and banks in response to the prison transfers of their leaders.
Twenty-one new killings were reported Monday, the state government of Sao Paulo said, putting the toll at 81 in the spree: 39 police officers and prison guards, 38 suspected gang members and four civilians caught in 184 attacks since Friday.
The state government said gangs targeted civilians for the first time on Monday, torching 56 buses and attacking eight banks.
Help? No thanks
Luiz Inacio Lula da Silva, the Brazilian president, offered to send 4,000 elite troops to restore order, but the Sao Paulo state governor said the help was not needed - even as the chaos prompted the stock market to cancel late trading.
"We are in control of the city and we will preserve this control," Claudio Lembo, the governor, declared. "At this moment the army is unnecessary."
The powerful First Capital Command gang launched riots in 73 prisons, taking some 244 hostages.
The gang first emerged in prisons in the 1990s and was responsible for uprisings in 20 prisons in February 2001. In November 2003, it launched attacks on security forces that left 11 officers and seven gang members dead.