MEXICO CITY (Reuters) -- The director of a prison in northeast Mexico where 49 people died in a riot this week was accused of murder and detained, along with two others, a state prosecutor said on Saturday.
READ MORE: Unusually strong earthquake shakes Oklahoma
The riot, likely the deadliest in Mexico's history, happened in the old and crowded Topo Chico prison in Monterrey, in the state of Nuevo Leon, just days ahead of a planned visit by Pope Francis to another jail in Mexico's far north.
See more from the scene:
The prison warden, Gregoria Salazar, and the deputy superintendent, Jesus Fernando Dominguez, were accused of homicide and abuse of authority and placed in preventive custody, said Roberto Flores, Nuevo Leon's prosecutor.
A prison guard, Jose Reyes Hernandez, was also detained but accused of homicide, Flores told a news conference.
The riot started when fighting broke out in two areas of the Topo Chico prison between supporters of a gang leader known as "Zeta 27" and another group. The prison has long housed members of the feared Zetas drug cartel, who many believed controlled it.
"Who is directly responsible? ... The director of the penitentiary," Flores told reporters.
For much of the last decade, the Zetas spread terror across Mexico before being debilitated by arrests and the deaths of their founding members.
The gang was also linked to another prison murder in Nuevo Leon in 2012, when 44 inmates died after Zetas members plotted with guards to stage an elaborate escape.
More from AOL.com:
Tiny house, big problem: Woman's home too small for Pa. laws
Critics react to Antonin Scalia's death with onslaught of insults
Donald Trump and Jeb Bush unload on each other in explosive debate exchange