Nearly three decades of civil war , which ended in the 1990s , left Cambodia as one of the worst mine-affected countries .