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.
'Look' how the Sheena Bora case has taken a toll on Indrani Mukerjea
Photos: Katrina Kaif, Parineeti Chopra, Shilpa Shetty's movie outing in Juhu
Birthday special: 14 Bollywood actors who made it big on TV
Photos: Vaani Kapoor, Poonam Pandey, Sana Khan at fashion event
Photos: Rishi Kapoor, wife Neetu, daughter Riddhima at book launch