Drug gangs set fire to buses and opened fire on police stations and posts around Rio de Janeiro in a wave of violence that killed 19 people, the state's top law enforcement officer said.
Thursday's victims included seven who were burned to death in one of six torched buses and three policemen, said Roberto Precioso, head of Rio's Public Safety Department.
Two other civilians were gunned down, including a street vendor caught in the crossfire of a shootout in Rio's Botafogo district, he said. Seven alleged gang members were also killed.
Precioso said gang members used handguns, machine guns and grenades in 12 attacks against police stations and outposts that began in the early morning.
Fourteen civilians and seven police officers were injured, he added.
Precioso said the attacks were apparently a show of force staged before a new governor is sworn in on Jan. 1. Police intelligence had warned the gangs were planning the attacks for some time.
"It is very difficult to prevent these types of attacks that were practically kamikaze," Precioso said at a news conference.
He said the attacks were apparently ordered from inside a state prison, but did not elaborate.
Rio's governor said gangs intended the attacks to be much bloodier.
"The idea was to kill hundreds of police and dozens of innocent people. I very much regret the deaths that have occurred," Rio de Janeiro State Gov. Rosinha Matheus told reporters.
The attacks began shortly after midnight on the Washington Luiz highway that links Rio de Janeiro with the nearby mountain resort of Petropolis where alleged gang members set fire to two interstate buses.
Four city buses were later set afire, Rio's Public Safety Office said.
Most of the violence occurred on Rio's poor north side, although a policeman was killed in the upscale Lagoa district and a woman was killed in an attack on a police booth in Botafogo.
Rio Mayor Cesar Maia said gangs appeared to be retaliating against militias - reportedly run by off-duty police officers - that in recent months have been battling the drug gangs in slums and charging residents for protection.
"The reason for what's happening is that militias have grown and the drug gangs are leaving," Maia told reporters. "To maintain their income, the gangs are increasing crime on the street."
Precioso said early action by Rio's police had prevented the violence from reaching levels seen in Sao Paulo, Brazil's largest city, in May when an organized crime group launched similar attacks that left nearly 200 people dead, including some 40 police and dozens of alleged gang members.
Retired Judge Walter Fanganiello Maierovitch, an expert on organized crime and Brazil's former drug czar, said police in Rio did a better job of containing the attacks.
"Precioso did not try to fool anyone and took to the offensive immediately," Maierovitch told CBN radio. "In Sao Paulo authorities downplayed the attacks at first, saying they were isolated incidents."
Still, he said, the violence shows that "Brazil's public safety policies are in shambles," adding that the attacks were a "chronicle of a tragedy foretold."
Precioso said police were working to contain ongoing attacks and that they did not present a danger to the millions expected to ring in the new year on Rio's beaches.
But he declined to answer a reporter's question about whether the police are prepared to handle security during the 2007 Pan American Games that will take place here.
Rio de Janeiro is one of the most violent cities in the world, with an annual murder rate of about 50 per 100,000 residents.