Handout photo shows an operation at the Bellavista prison after a riot in Ecuador. AFP
Authorities said a fight broke out between the rival Los Lobos and R7 gangs inside the Bellavista prison in Santo Domingo de los Colorados, in the center of Ecuador some 80 kilometers (50 miles) from Quito.
During the riot, dozens of inmates tried to escape.
Police chief Fausto Salinas told reporters that 108 were missing after another 112 escaped prisoners were recaptured.
The South American country's prison authority SNAI said it has activated security protocols to contain the "disturbances to order."
Six gang leaders were transferred from Bellavista to two maximum security prisons, the interior ministry said.
Interior Minister Patricio Carrillo had initially claimed authorities were in control of the situation and that all escaped prisoners had been recaptured.
Soldiers patrol outside Bellavista prison in Santo Domingo de los Tsachilas, Ecuador, on Monday. AP
Inmates with facial injuries were taken by truck and ambulance to medical facilities while family members of those incarcerated gathered at the prison looking for information, AFP reporters at the scene said.
Prior to this one, around 350 inmates had been killed in five separate prison riots since February 2021.
Just last month, at least 20 inmates died inside the El Turi prison in Cuenca, southern Ecuador.
President Guillermo Lasso insists the problem inside the facilities mirrors that outside, where drug gangs are vying for control of trafficking routes.
Those rivalries among inmates sometimes explode into violence, with some prisoners hacked to death or beheaded with machetes.
A wounded inmate is transported after a riot in Santo Domingo de los Tsachilas, Ecuador, on Monday. AFP
"The majority of victims, if not almost 100 percent, were killed with knives and not guns," said Carrillo.
"Their mutilated bodies were left where they were."
The prisoners were killed in their cells and common rooms, after which inmates then used guns to try to escape the facility.
Authorities have said they will carry out a search for weapons and transfer gang leaders to a different prison in Guayas province.
"This is the unfortunate result of gang violence," Lasso, who is on a state visit to Israel, wrote on Twitter.
He also expressed "condolences to relatives" of the victims.
Relatives wait outside Bellavista prison in Santo Domingo de los Tsachilas, Ecuador, on Monday. AP
Even with greater investment in the prison system, the creation of a commission to pacify facilities and new policies such as the holding of the most dangerous prisoners at a single penitentiary, have not reduced the bloody violence.
Overcrowding is another problem, with 35,000 detainees in 65 prisons that only have a capacity for 30,000 inmates.
The 1,200-capacity Bellavista prison houses 1,700 inmates.
Ecuador has also seen a rise in street crime and drug trafficking which the government has tried to tackle by declaring a state of emergency in the three worst affected provinces: Guayas, Manabi and Esmeraldas.
The country seized a record 210 tons of drugs in 2021 and has already seized another 82 tons this year.
Ecuador, which borders the world's two largest producers of cocaine, Colombia and Peru, is often used as a jumping off point to export the white powder to the United States and Europe.