At least 30 people, including 19 policemen, have been killed in a spate of attacks in Sao Paulo, Brazil.
Armed criminals targeted officers in 55 attacks in the early hours of Saturday. Authorities blamed the First Command of the Capital (PCC) faction.
The attacks may be in response to a transfer of PCC inmates, analysts say.
The attacks were followed by jail revolts, with 100 hostages being taken. The state governor insisted Sao Paulo would not bow to organised crime.
The incident thought to have sparked the attacks was Friday's transfer of about 600 prisoners to a maximum security unit.
It was organised to try to counter a co-ordinated rebellion planned by the PCC for the weekend in a number of prisons in Sao Paulo state.
PCC leaders were being questioned on the subject when the attacks started on Friday night, targeting officers in police stations, mobile units, at their homes or in bars.
The assailants used machine-guns and grenades. In one incident a home-made bomb was thrown into a police station.
As well as in the city of Sao Paulo, the attacks took place in the suburbs of Osasco, Guarulhos and Carapicuiba, and in the coastal cities of Cubatao and Guaruja.
In addition to the dead, at least 15 policemen and 15 attackers were wounded and 16 attackers arrested, police said.
The BBC's Steve Kingstone in Sao Paulo says the state is accustomed to violent crime, but not on this scale.
Denis Mizne of the Instituto Sou da Paz, which works to improve Brazilian policing, said: "You are living in a city and you wake up seeing that police officers... were attacked at the same time by an organised group.
"If the state is being attacked, what can happen with every normal citizen. That's what everybody thinks."
Police officials said they would not be intimidated.
"The police will not retreat from these attacks," Sao Paulo State Security Secretary Saulo de Castro Abreu Filho told local TV.
"They have struck at the spinal cord... of our security."
The attacks sparked revolts in more than 20 state jails, with 100 hostages being held.
Marcelo Daniel, a spokesman for the Sao Paulo state prison affairs secretary, played down the situation, saying: "As far as we can tell none of the hostages has been hurt or seriously threatened, which is why we are considering these uprisings as minor."
Founded in 1993, the PCC has been involved in drugs and arms trafficking, kidnappings, bank robberies, and prison breaks and rebellions, police say.
In November 2003, the gang attacked more than 50 police stations, killing three police officers and wounding 12.
Those attacks were thought to have been orchestrated by PCC leaders in jail.