At least 22 inmates have died and several police have been injured during riots at two of Ecuador's largest penitentiaries, marking the second major deadly wave of prison violence this year.
Special police units were deployed on Thursday to the jails in southern Guayas province and Cotopaxi province, south of Quito, the capital, to quell the violence.
In February, at least 79 inmates died at three prisons - including the centres in Guayas and Cotopaxi - in clashes between rival gangs. Guayas is home to Guayaquil, Ecuador's largest city.
"I want to say to the mafias that seek to threaten this country that they're mistaken if they think this government will act with the same weakness as the previous ones," President Guillermo Lasso said in a speech in the city of Latacunga.
He declared a state of emergency in the country's jail system.
Interior Minister Alexandra Vela said 78 prisoners had been recaptured. He said 41 prisoners and five police officers were wounded at the Cotopaxi prison.
Ecuadorian officials have for years sought to reduce violence at the country's overcrowded prisons, home to some 38,000 inmates.