Inmates at a prison near Venezuela's capital freed the prison director and 14 other hostages Thursday and ended an eight-day standoff over conditions at the jail.
The prisoners released the last of their hostages after talks led to an agreement by government officials to provide medical services, set up a library and remove a national prisons administrator from his post.
The hostages left El Rodeo II prison in ambulances. The inmates had initially taken 22 people hostage April 27 but freed seven earlier this week during the negotiations with authorities.
Deputy Interior Minister Edwin Rojas confirmed that officials had complied with one key demand: removing a national prisons administrator and opening an investigation into accusations he was involved in corruption.
As part of the agreement, six inmates were also taken to a hospital outside the prison to be checked for possible tuberculosis cases.
The uprising in the prison near Caracas erupted after a sick inmate who apparently had tuberculosis was taken to another lockup where he was not given medical treatment, said Humberto Prado, a rights activist who leads the organization Venezuelan Prisons Observatory.
Prado criticized the inmates' tactics but said the prisoners decided to take hostages in part because they had been demanding medical care for a month and had not received any response from authorities.
Last year, 20 inmates with tuberculosis and AIDS died in Venezuelan prisons due to a lack of medical care, and eight more have died this year of the same causes, Prado told The Associated Press.
Venezuela's 30 prisons were designed to hold a total of 15,000 inmates, but the prison population is more than double that size. Chronic delays in court proceedings contribute to the problem.
Violence is common in the severely crowded and understaffed prisons, where inmates are able to obtain firearms and other weapons with the help of corrupt guards.
During 2009, 366 deaths were reported at Venezuela's prisons, according to figures kept by Prado's group. Some of the victims were killed using firearms.