The death toll from a prison riot in the northern Mexican border state of Nuevo Leon rose to 16 on Wednesday when three more inmates died of their wounds.
Two guards and several inmates were also hurt in the uprising.
State government spokesman Aldo Fasci said autopsies had not yet been completed to determine how many of the prisoners were killed by bullets fired by state and federal police who finally quelled the violence.
Fasci said the riot was fueled by "fights between rival gangs," a half-dozen of which were housed at the state prison in the city of Cadereyta.
One guard whose lung was punctured remained in serious condition.
Tuesday's riot saw inmates take guards hostage, beat them and threaten to throw them off the roof of the prison. All afternoon desperate relatives of inmates demanded information from authorities outside the gates as black smoke poured from several points.
When police first went in trying to take control, they were met by about 150 prisoners who attacked them with metal tools and rubble from work that was being carried out inside the facility.
Fasci said several hours of attempted negotiations failed, and police were unable to put down the riot without using lethal force.
He said prisoners at the facility are separated by gang affiliation, but that one group didn't fit because members had worked for a number of organizations.
State prosecutor Bernardo Gonzalez said 54 inmates were being investigated for crimes committed in the riot.
In March, four inmates died after they took control of a pharmacy at the same prison and apparently overdosed.
In February 2016, in another lockup in Nuevo Leon, 49 prisoners died when two factions of the Zetas cartel clashed.