The end of the regime was brought about by an incursion into the Vietnamese border town of Ba ChĂșc, resulting in the massacre of more than 3000 civilians. Vietnam invaded, toppled the Khmer Rouge and brought an end to the executions although civil war would continue for much of the next decade.
For these actions Vietnam was extensively sanctioned[1]. The parallels with ongoing conflicts today are hard to ignore.
[0] https://en.wikipedia.org/wiki/Khmer_Rouge#Crimes_against_hum...
[1] https://en.wikipedia.org/wiki/Cambodian%E2%80%93Vietnamese_W...