The fight broke out at the prison in Altamira around 6 a.m. Saturday, the Tamaulipas Public Safety Secretariat and the attorney general's office said.
Nine inmates were turned over to prosecutors in connection with the fight, the secretariat and the AG's office said in a statement.
The nine inmates confessed that they were involved in the fight, telling investigators that they killed the seven prisoners to settle scores.
The inmates were killed in cell block three in a fight with "sharp weapons", the lead investigator in the case said.
Photos: 'Godmen' who courted controversy
Photos: Kajol with mother, sister Tanishaa at Dadar Durga Puja pandal
Photos: Yuvraj Singh and wife Hazel Keech teach marriage lessons
Kareena Kapoor Khan snapped with baby Taimur at mom Babita's house
Photos: Amruta Fadnavis at a fashion and lifestyle exhibition