A prison uprising that caused seven deaths ended peacefully on its 27th day Wednesday when hundreds of inmates emerged from the embattled Rodeo II prison after negotiations with officials, Venezuelan authorities said.
Justice Minister Tareck El Aissami said on state television that the National Guard had taken control of the prison from inmates and that "we've managed for all of them to come down to the patios."
"We celebrate the triumph of peace, dialogue," El Aissami said.
He said the standoff had been resolved after long talks with the rebelling inmates, including a guarantee from authorities to the prisoners that they would not be harmed.
Information Minister Andres Izarra wrote via Twitter that 831 inmates had come out of the prison.
After regaining control of the facility, officials began searching for inmates' weapons, El Aissami said.
Hundreds of inmates had been holed up inside the prison just outside the capital of Caracas since June 17 while armed prisoners resisted authorities. But officials have said only about 60 armed inmates were leading the uprising, preventing troops from entering and holding other prisoners hostage.
El Aissami said some of the rebellious inmates decided to end the uprising and turned themselves over to National Guard troops.
"Some of the leaders of these organizations, of the mafias that were there, have changed their violent attitude," he said. "They have been identified (and) they are now in the National Guard's custody."
President Hugo Chavez, in a message on Twitter, congratulated authorities for peacefully bringing an end to the standoff. He called it an "example of supreme respect for human rights," while also saying the ordeal has been cause for "great self-criticism."
Grisel Zorrilla, a spokeswoman for prisoners' relatives, told The Associated Press that the inmates were led from their cellblocks and were organized into groups on a patio of the prison compound.
She said authorities were then taking the men to bathe and provide them food and water. She said the inmates were in healthy condition despite showing signs of dehydration.
"They have been treated fairly," Zorrilla said in a telephone interview. "They are a bit dehydrated, but the boys have maintained their strength."
Zorrilla said she entered the prison along with 19 other relatives to monitor the actions of prison authorities.
The inmates began the standoff after thousands of soldiers raided adjacent El Rodeo I prison in a weapons search days after a bloody riot that left 22 dead, including one prisoner. The raid set off gunfights between troops and inmates that killed one prisoner and two soldiers and wounded 20 troops. Four more inmates who escaped were slain by soldiers, authorities reported Wednesday.
Carlos Nieto, director of Window To Freedom, a human rights organizations that follows prison issues, said a peaceful end to the conflict was made possible by negotiations between leaders of rebellious inmates and authorities. An agreement was finally reached, because officials guaranteed the rights of the prisoners, he said.
The surrender of an inmate who purportedly orchestrated the uprising also helped settle the dispute, Nieto said. The inmate told authorities that another prisoner leader Valentin Yordis Lopez, who goes by the nickname "Oriente," escaped from the lockup.
El Aissami confirmed that several inmates, including Lopez, escaped after slipping through broken bars surrounding the perimeter of the prison yard. Four of those who escaped were killed by National Guard troops as they scrambled up a forested hill surrounding the prison, El Aissami said.
Last month's search turned up seven rifles, five shotguns, 20 handguns, eight hand grenades, 5,000 rifle bullets, 53 kilograms (116 pounds) of cocaine and the equivalent of more than $24,000 in Venezuelan currency, according to authorities.
An investigation following the raid led to the arrests of a prison warden, a National Guard captain whose unit patrolled the prison and seven other officials. They were charged with supplying arms, explosives and drugs to inmates.
Venezuela's severely crowded prisons have suffered repeated violent outbursts as rival gangs fight for control of cellblocks and sell weapons and drugs with the help of corrupt prison guards.
The government says Venezuela has more than 44,000 inmates in its 34 prisons. The prisons were built to hold about 12,500 inmates, according to the Venezuelan Prisons Observatory, a group that monitors prison conditions.
Last year, 476 people died and 967 were injured in prison violence, according to figures compiled by the Inter-American Commission on Human Rights.