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.
Spotted: Virat Kohli, Anushka Sharma and other celebs at Mumbai airport
Photos: Salman Khan's 'special friend' Iulia Vantur at a song launch
Photos: Hrithik Roshan, Anushka Sharma, other celebs dazzle at event
In Pictures: Sex scandals involving Indian politicians
Photos: Abhishek Bachchan and Farah Khan at Boman Irani's birthday bash