Hundreds of inmates at the jail in the southern state of Quintana Roo protested after police transferred some 40 prisoners, including Marcos Adelaido Gallegos, a prison leader known as 'The Godfather', to a different jail near Chetumal, the state capital.
"Everything started with an apparent opposition among the prisoners to the transfer of other inmates to another jail," a source at the state prosecutor's office said.
Gallegos, a convicted rapist, was respected by prisoners because he helped keep order inside the jail. He is serving 17 years for the rape of minors.
Gallegos was not among those who escaped the prison.
During the riot, inmates destroyed their cell door padlocks, attacked the prison staff and rushed toward the jail entrance.
Inmates wearing balaclavas and bandanas protested on the prison roof. They held banners with slogans including "No more deaths".