Authorities had initially reported five deaths, but later raised the toll more bodies were found scattered throughout the prison.
Robert Alvarez Heredia, the Guerrero state security spokesman, said in a statement that the fighting broke out around 4 a.m. He said security forces later regained control and slowly began discovering bodies in a kitchen, a cellblock and other areas.
"The incident began because of the constant dispute between rival groups inside the prison," Alvarez said.
State police said the prison population is more than 2,000.
A brawl between rival drug gangs at an overcrowded penitentiary in northern Mexico in February resulted in 49 inmates being killed, Mexico's deadliest prison melee in years. That clash was between inmates aligned with the Zetas and Gulf drug cartels.
In June, Mexico's governmental rights agency issued a report that said many of the country's prisons are unsafe, overcrowded and understaffed. The report warned of insufficient staff, unsafe procedures and poor medical care at many facilities.
The National Human Rights Commission said it surveyed conditions at over 190 state, local and federal jails. It found that inmates often controlled some areas of prisons or had contraband inside.
Guerrero has been one of Mexico's most violent states and the once-glamorous resort of Acapulco has struggled with a high number of killings.