MEXICO CITY (AP) — Rival gangs clashed Friday, killing 14 inmates at a prison in the Mexican border city of Matamoros, across from Brownsville, Texas.

The prisoners died of knife wounds and beatings in the fight early Friday, said Jose Soberon, public safety secretary of the Gulf coast state of Tamaulipas.

Soberon told Milenio Television that the inmates involved in the deadly clash were serving sentences for organized crime, drug trafficking and weapons possession.

Soberon did not say what gangs were involved in the confrontation, but Tamaulipas has been wracked by bloody turf battles between the Zetas drug gang and their former allies, the Gulf drug cartel.

Federal authorities helped Tamaulipas officials to quash the fight. A spokesman for Tamaulipas state police said there was no immediate information on how many were injured in the fight.

Inmates at Mexican prisons frequently make knives, clubs and other weapons from scrap materials inside the facilities, though it was not immediately clear where they got the weapons used in Thursday's fight.

In 2008, 21 prisoners died in a fight between inmates at another state prison in the border city of Reynosa, across from McAllen, Texas.