Guards and officials at a prison in northern Mexico let inmates out, lent them guns and allowed them to use official vehicles to carry out drug-related killings, including the massacre of 17 people, prosecutors claimed.
After carrying out the killings the inmates would return to their cells, the Attorney General's Office said in a revelation that was shocking even for a country wearied by years of drug violence and corruption.
"According to witnesses, the inmates were allowed to leave with authorisation of the prison director ... to carry out instructions for revenge attacks using official vehicles and using guards' weapons for executions," office spokesman Ricardo Najera said at a news conference.
The director of the prison in Gomez Palacio in Durango state and three other officials were placed under a form of house arrest pending further investigation. No charges have yet been filed.
Prosecutors said the prison-based hit squad was suspected of three mass shootings, including the July 18 attack on a party in the city of Torreon, which is near Gomez Palacio.
In that incident, gunmen fired indiscriminately into a crowd of mainly young people in a rented hall, killing 17 people.
Police found more than 120 bullet casings at the scene and Mr Najera said tests matched them to four assault rifles assigned to guards at the prison.
Similar ballistics tests linked the guns to earlier killings at two bars in Torreon, the capital of northern Coahuila state, he said.
At least 16 people were killed in those attacks on February 1 and May 15, local media reported.
Mr Najera blamed the killings on disputes between rival drug cartels.
"Unfortunately, the criminals also carried out cowardly killings of innocent civilians, only to return to their cells," he said.
Coahuila and neighbouring Durango are among several northern states that have seen an increase in drug-related violence that authorities attribute to a fight between the Gulf cartel and its former enforcers, known as the Zetas.
Mexico has long had a problem with investigating crimes, catching criminals and convicting people. Reports estimate less than 2% of crimes in Mexico result in prison sentences.
Interior secretary Francisco Blake said the revelation "can only be seen as a wake-up call for authorities to address, once again, the state of deterioration in many local law enforcement institutions ... we cannot allow this kind of thing to happen again".Reuse content