All of the deaths occurred late Friday or early Saturday, when the guards had fled the prison and battles raged between hundreds of prisoners.
Police officers and soldiers surrounded the prison before the authorities took back control after negotiations with the inmates.
Alberto Uribe, a spokesman for the country's prison system, said: "We found destroyed walls, knives, home-made weapons and disfigured bodies."
Relatives of inmates gathered outside the prison, hoping for information on what was happening inside.
Roberto Villanova, prisons director, said the jail will be under a state of emergency for 15 days and that more prisoners will be transferred to try to avoid another uprising.
Built to hold 1,800 inmates, the facility houses more than 3,000, many considered to be the most dangerous in the country.
Beatrice de Carrillo, government human rights prosecutor, criticised authorities for mixing gang members and common prisoners.
"These deaths are another sign that the penitentiary system doesn't work," she said. "This is one of the ugliest massacres that we have seen in recent times."
Central American jails have long struggled with overcrowding and deadly riots that are often sparked by fights between gangs.
Overcrowding is fuelled in part by a regional gang crackdown that has filled prisons with rival groups.
In eastern Venezuela, at least 16 people were killed and 13 injured as rival gangs of inmates fought for control of a prison this month.
Last month, a protest at a Mexican prison left at least two people dead.
Flood of violence
Brazil's prisons also experienced a wave of violence, during which police and guards put down at least seven rebellions in which one inmate was killed.
In Guatemala, a gang was blamed for initiating riots that left 35 inmates dead in 2005.
In El Salvador, 31 inmates were killed in 2004 during a battle between gang and non-gang prisoners.
And a flood of violence in Honduran prisons killed more than 180 prisoners in 2004 and 2005.