Moments before the attack, armed men fired on municipal police along a nearby boulevard, setting off a car chase that ended with the seizure of a vehicle and four men, it added.
Later, assailants in a Hummer fired on another group of security agents outside the prison, it said.
Prosecutors said fighting within the prison, where inmates from differing criminal bands and drug cartels are housed in separate cellblocks, also left 13 people injured.
Prosecutors said four people were detained but did not specify if they were inmates or armed assailants.
Prosecutors in the city, which is across the border from El Paso, Texas, said they were investigating the motive of the attack.