Relatives of inmates at Apodaca prison pull the security fence following a riot inside the prison, on Sunday near Monterrey where 44 inmates were killed. (Julio Cesar Aguilar/AFP/Getty Images)

The worst prison riot in Mexico in years was not really a riot. It was mass murder.

Mexican officials said Monday that it appears all of the 44 inmates stabbed and beaten to death at a state prison in northern Mexico on Sunday were members of the same crime syndicate, known as the Gulf Cartel.

They were murdered by their arch enemies, members of Los Zetas, a sensationally violent group that appears to have staged the massacre, in part, as a diversion.

About 30 members of the Zeta cartel escaped from the overcrowded Apodaca prison near Monterrey in the hours after the killings. Officials called the escapees “especially dangerous.”

What was initially characterized as a melee among rival gangs appears to have been a well-planned and -executed attack, followed by a successful getaway, accomplished with the help of the jailers.

The governor of Nuevo Leon, Rodrigo Medina, told reporters Monday that the prison's director, three top officials and 18 guards are under investigation and may have aided in the escape. The governor called the prison officials “a group of traitors” and said that it appeared they were corrupted by the powerful Zeta syndicate.

“The most important thing is to make sure that the people working on the inside are on the side of the law, and that they not be corrupted and collaborate with the criminals,” Medina said.

The governor also used his press conference to complain that his state prisons are overcrowded with inmates facing federal charges for drug and weapons trafficking, kidnapping and extortion. He said that in Nuevo Leon state, 60 percent of all inmates are incarcerated for federal crimes.

Mexico is engaged in a prison building boom, and new guards are being trained by the U.S. government. But the handful of new maximum security federal prisons cannot keep up with the flow of criminals.

The Mexican government has been overwhelmed by huge numbers of arrests in its five-year, military-led, U.S.-backed war against organized crime. Prisons are now jammed with inmates, including many who await convictions in poorly run, antiquated, dangerous state prisons, where many criminals continue to run their operations via courier and cellphone.

According to the Associated Press, all 2,500 inmates in Apodaca prison were incarcerated for federal crimes, and as many as 70 percent had yet to be convicted. The inmate population there grew by 1,500 in the past year to 180 percent of capacity, the result of a crackdown on organized crime and drug trafficking.