At least 16 people have been killed and 13 injured as rival gangs of inmates fought for control of a prison in eastern Venezuela.
Some prisoners were hanged before National Guard troops restored order in Uribana Prison near the city of Barquisimeto, 280km (175 miles) west of Caracas.
Fanny Marquez, director of prisons at the Venezuelan justice ministry, said the situation was now under control.
"It began with a fight between prisoners from two cell blocks, who were battling for control of the facility," she said.
Marquez said most of the inmates were killed with guns and knives, and others were lynched, after the riot broke out before dawn on Tuesday.
She said the authorities had already hired additional prison staff to stop prisoners from smuggling in guns or making crude weapons in their cells.
Violence is common in Venezuela's overcrowded and under-staffed prisons, where about 20,000 inmates live in 30 facilities built to hold 15,000.
Prisoners often bribe guards to obtain weapons.
At least 378 inmates were killed and 883 more were injured between January and November in prison violence last year, according to the Venezuelan Prisons Observatory.
About 411 inmates were killed and 737 more were injured in 2005.