At least 29 prison inmates have been killed in northwestern Mexico as rival gangs clashed inside a jailhouse, authorities have said.
In the first attack in the coast city of Mazatlan in Sinaloa state on Monday, 20 prisoners were shot to death when members of the Zetas drug gang reportedly opened fire on members of the powerful Sinaloa cartel, local media reported.
Hours later, eight more prisoners were stabbed to death by other inmates in the pen.
The gang that initiated the shooting killed 17 rivals and lost three of its own members.
In the violence, three policemen guarding the prison were wounded and one of them was in serious condition.
The gun battles were quickly brought under control by prison guards and investigators found two pistols and an assault rifle inside the jail, Sinaloa state prosecutors' office said.
Police have been investigating what sparked the violence, the spokeswoman for the state's Public Safety Department said.
Many of Mexico's most powerful drug traffickers hail from the northwestern state of Sinaloa, a key smuggling corridor and cultivation area for marijuana and other narcotics.
Sinaloa, and Mazatlan in particular, is rife with turf battles among drug gangs.
Mexico's drug gangs frequently try to break their members out of prison by staging attacks.
But there has been no confirmation Monday's violence involved a prison-break attempt.