Nuevo Leon Gov. Jaime Rodriguez told a news conference the fight involved a faction led by a member of the infamous Zetas drug cartel.
Rescue workers could be seen bringing injured inmates from the Topo Chico prison in Monterrey, at least some with burns.
The riot broke out just six days before Pope Francis is scheduled to visit another Mexican prison, in the border city of Ciudad Juarez in Chihuahua state.
Images broadcast by Milenio Television showed flames leaping from the prison, with a crowd of people bundled against the cold gathered outside the prison. Some shook and kicked at the prison gates, demanding to be allowed in.
The fire appeared to have been extinguished by shortly after sunrise.
Witnesses said the fire broke out at about 12:30 a.m. (1:30 a.m. EST; 0630 GMT) amid shouts and sounds of explosions. A thick cloud of smoke rose, apparently from inmates burning mattresses.
Mexico’s official National Human Rights Commission reported in 2013 that the country’s prison system is plagued by violence and cases of inmate control, symptoms of corruption and lack of resources.
The report, based on visits and interviews at 101 of Mexico’s most populated prisons, found that 65 of the facilities were run by inmates, not authorities.
In one of the worst incidents in 25 years, 44 inmates died in a prison massacre in February 2012 in Apodaca, Nuevo Leon. After the incident, three top prison officials and 26 guards were accused of helping inmates escape in the confusion. The governor of Nuevo Leon state says 52 inmates were killed and 12 injured in a brutal fight between two rival factions Thursday at a prison in northern Mexico.