A shootout at the municipal jail in Ciudad Juarez, Mexico's murder capital, left 17 inmates dead and 20 others wounded, a city spokesman said Tuesday.
The shootout occurred Monday night at the jail in Juarez, located across the Rio Grande from El Paso, Texas, municipal spokesman Manuel del Castillo said.
A woman was among those killed in the incident, Del Castillo said, adding that four of the wounded inmates were listed in serious condition at a hospital in the border city.
Shooting broke out between members of the rival Los Aztecas and Los Mexicles gangs at the prison, the city spokesman said.
Los Mexicles works as the armed wing of the Sinaloa drug cartel in the border city, while Los Aztecas provides enforcers for La Linea, a gang allied with the Juarez cartel.
The cartels have been battling for control of the border city, unleashing a wave of violence that has left thousands of people dead since 2006.
The gang members had firearms and gained control of guards' weapons, jail spokesman Hector Conde said.
Army troops, Federal Police officers and municipal police, as well as transit police officers, were sent to the jail to end the shootout, which lasted more than one hour.
The situation at the jail, which houses about 2,300 prisoners, was brought under control around 2:00 a.m.
Ciudad Juarez has been plagued by drug-related violence for years.
The murder rate took off in the gritty border city of 1.5 million people in 2007, when 310 people were killed, then it more than tripled to 1,607 in 2008, according to Chihuahua state Attorney General's Office figures, with the number of killings climbing to 2,754 in 2009.
More than 3,100 people were murdered in the border city last year, making 2010 the worst year since a war between rival drug gangs sent the homicide rate skyrocketing in 2008.
The killing has not slowed this year, with more than 1,000 people murdered in Juarez.
The violence is blamed on the war for control of the border city being waged by the Juarez and Sinaloa cartels with backing from hitmen from local street gangs.
At least 14,000 "armed criminals" are in Ciudad Juarez and Chihuahua city, the state capital, working for the drug cartels that are fighting for control of smuggling routes into the United States, Chihuahua Attorney General Carlos Manuel Salas said last month.
About 5,500 of the armed criminals operating in Ciudad Juarez belong to Los Aztecas, a gang that works as the armed wing of the Juarez cartel, while the rest work for the Sinaloa cartel, Salas said.
The violence has not subsided in Ciudad Juarez despite the deployment of nearly 10,000 soldiers and Federal Police officers in the border city.