The clashes broke out overnight between rival gangs at Apodoca prison, some 30 kilometres from Monterrey. Families were gathering outside the institution, awaiting news of their loved ones.
"So far we have counted 38 dead," Jorge Domene, a spokesman for the state corrections' system, told AFP, adding that the situation inside the prison was now calm and that forensic teams were working to identify the bodies.
Riots are common in Mexico's notoriously overcrowded prisons. It was the second deadly such brawl in recent months near Monterrey after seven inmates died and 12 were injured in a clash in October at Cadereyta prison. Monterrey, an industrial hub and Mexico's third largest city, has seen an upsurge in violence in recent months blamed on fighting between the brutal Zetas drug gang and their former employers, the Gulf cartel. Members of both groups are in Apodoca prison.
The deadly riots come just days after a horrific blaze at a Honduran prison left 359 inmates dead and shone a spotlight on Latin America's overcrowded penitentiaries.