About 20 convicts were killed when they tried to break out of a jail in the central Cambodian province of Kampong Cham, police have said.
Around 50 were involved in the escape attempt and 30 are still at large, officials say.
Reports say some convicts took prison officials hostage, then seized vehicles and crashed them through the gates.
Other inmates followed them on foot, but guards shot them as they tried to flee the prison.
All hostages have been freed. At least two of them were seriously injured and taken to Vietnam for treatment.
"They held knives to them and beat them with sticks they had," a provincial police chief said.
The prison, known as Number Three in the kingdom's penal system, is notorious for its grim conditions and holds more than 900 inmates, he added.
It is 80km (50 miles) north-east of the capital, Phnom Penh, near the Vietnamese border.