Venezuelan security forces have taken control of a prison in Merida state, ending a deadly riot that lasted more than 20 days, the government says.
Prisons Minister Iris Varela said police moved into the Cepra penitentiary in the early hours of Saturday.
She said leaders of the rebellion had given themselves up.
At least 22 people were killed during the weeks of protest against compulsory transfers to other jails.
Ms Varela said the riot leaders surrendered after weeks of negotiation.
She said that no-one had been injured in the operation, adding that the human rights of all inmates had been respected.
"The leaders of the riot are already in the hands of the authorities," she told state TV channel Venezolana de Television.
"There will be no longer armed inmates in the prison, we will not have a situation like that in Merida state again."
The Inter-American Commission on Human Rights says protests and fights between rival gangs in Venezuela's overcrowded prisons led to more than 500 deaths last year.
When Ms Varela was appointed in August 2011 she said that 20,000 people who had committed only minor crimes could be conditionally freed.
"Of Venezuela's 50,000 inmates, 20,000 shouldn't be in jail," she said then.