MEXICO CITY — Ten guards and four inmates were killed Sunday when gunmen in armored vehicles attacked a state prison in Ciudad Juárez across the border from El Paso, Texas, according to state officials.

The Chihuahua state attorney’s office said in a statement that around 7 am (8 am ET) several armored vehicles arrived at the prison and gunmen opened fire on the guards. In addition to the dead, 13 people were injured and at least 24 inmates escaped.

Mexican soldiers and state police regained control of the prison later on Sunday. The state attorney’s office said its staff was investigating.

In August, a riot inside the same state prison spilled over into the streets of Juárez in violence that left 11 dead.

In that case, two inmates were killed inside the prison and then suspected gang members began shooting into the town, even killing four radio station employees who were doing a restaurant promotion.

Violence is common in Mexican prisons, even in some where authorities maintain only nominal control. Clashes regularly break out between inmates of rival gangs, who in places like Juárez serve as proxies for drug cartels.

Shortly before the attack on the prison on Sunday, municipal police officers were attacked and managed to capture four men after a chase, according to a statement from the state prosecutor’s office. Police later killed two suspected gunmen who were traveling in a van.