(CNN) -- Top officials in Mexico said Sunday that authorities at a prison released and armed several inmates to attack a group of people during a birthday celebration last week in a killing spree that left 17 dead.
Ricardo Najera, a spokesman for Mexico's Interior Ministry said authorities allowed a group of inmates to leave the Cereso prison in Gomez Palacio, in Mexico's Durango state, in police vehicles to launch an attack on revelers at a farm in Torreon in the neighboring state of Coahuila.
"The delinquents were committing their executions as part of a debt-settling scheme against members of rivaling groups from organized crime," Najera said Sunday of the July 18 attack.
"Unfortunately, in these executions, these delinquents also cowardly murdered innocent civilians," he said, adding that the inmates returned to the prison after the attack.
Four top Cereso Gomez Palacio prison workers -- including the prison's director -- were named as suspects in the investigation, Najera said.
The interior ministry said Sunday that the four suspects had been "detained," but it was not clear whether charges had been filed.
Police were able to trace the weapons used in the July 18 incident to other violent attacks, Najera said.
Mexico's interior minister, Francisco Blake, said Sunday that the Gomez Palacio prison incident sheds light on Mexico's tenuous security and the "deteriorating state" of Mexico's local law enforcement.
"Today, it is evident that the Mexican state is facing an enormous challenge in security," said Blake. He asked local authorities to monitor "the presumed complicity of local authorities" with criminal elements.
According to the U.S. State Department, many of the narcotics-related attacks in Mexico have occurred in the northern border region.