About 30 prisoners staged a protest early on Sunday at the Samut Sakhon prison after an inmate died of heart failure, provincial police chief Pol Maj-Gen Thayanrit Ekphaophan said.
The protesters claimed the death of the inmate, who succumbed at about 2am, was caused by the prison's poor medical care for those incarcerated.
About 400 policemen were deployed around the prison to prevent violence.
The prisoners agreed to end the protest at about 8am after talks with prison officials.