A prison officer has died and another is seriously wounded after rioting broke out at a jail in the Brazilian city of Sao Paulo.
They were among several guards taken hostage when more than 200 inmates at the Pinheiros detention centre began their uprising early Thursday.
Some of the hostages were released, but inmates still control a section of the prison as riot police gather outside.
Brazil's prisons are often overcrowded, with reputedly brutal conditions.
Pinheiros is said to hold nearly double its capacity of inmates.
The riot began after gunmen in a passing car fired shots at guards in an attempt to help inmates escape, Tadeu Pereira of Sao Paulo state prison department was quoted by the Associated Press as saying.
The prisoners then overwhelmed the guards with makeshift knives, clubs and other home-made weapons, taking several hostage.
It was unclear who shot and killed the guard, Mr Pereira said. He said the wounded guard was stabbed in the chest and a number of other guards received minor stab wounds.
Television pictures showed inmates shouting from the prison roof.
Negotiations were said to be continuing several hours after the uprising, with hundreds of riot police massed on the outskirts of the jail complex.