All 136 hostages seized during prison riots in Ecuador were freed on Saturday night, prison authorities said.
"Security protocols and the joint work of the police and the national army enabled the release of all the hostages who were being held in various prisons across the country," the SNAI prison authorities said in a statement on X.
President Daniel Noboa celebrated their release.
"Congratulations to the patriotic, professional and courageous work of the armed forces, national police and the SNAI [...] for achieving the release of the prison guards and administrative staff held in the detention centers of Azuay, Canar, Esmeraldas, Cotopaxi, Tungurahua, El Oro and Loja," Noboa wrote on X.
Police said 46 guards and one civil servant were released from the Cotopaxi prison, 13 from Tungurahua prison, and 15 others from El Oro prison, where the body of a civil servant was found.
Images broadcast by the police showed the guards, many in tears, exhausted and supported by their colleagues shortly after their release.
During their ordeal, the hostages had often begged authorities for help via videos posted on social media.
At least two hostages were killed by the inmates, one of them hanged, according to the videos.
Nearly 180 prison guards and civil servants were taken hostage by the end of last week, with 41 freed earlier.
The prison workers were taken hostage after Noboa launched a military takedown of criminal groups this week, sparking a deadly confrontation with narco gangs in the South American nation.
The crisis was triggered by the escape from Guayaquil prison of one of the country's most powerful narco bosses, Jose Adolfo Macias, known by the alias "Fito," triggering riots in at least five prisons and attacks on security forces aimed at spreading terror.
More than 22,400 military personnel were deployed across the country and in prisons, while a nightly curfew was imposed.