In 1954, the elected, mildly progressive president of Guatemala, Jacobo Arbenz, was deposed in a coup orchestrated by the CIA. Arbenz planned modest land reforms that threatened the interests of the United Fruit Company. His successor reversed the reforms and put to the firing squad an estimated 8000 opponents. The coup launched 42 years of dictatorship and violent repression. By the time peace accords were signed between the government and leftist guerillas in 1996, at least 200,000 people had died violently, more than 90 per cent at the hands of government agents; 100,000 women and girls had been raped and one million people displaced. Even after the peace accords, political assassinations continued.

One president in the 1970s said that to eliminate the guerrillas he would ‘turn the country into a cemetery’. His prescription came closest to fulfilment during the short but bloody dictatorship of General Efraín Ríos Montt, who on Friday was found guilty of genocide and sentenced to 80 years in prison.

When Ríos Montt seized power in March 1982, the guerrillas were having some success. He believed they were drawing much of their strength from Mayan villages in the north-west of the country. About 400 villages were destroyed before Ríos Montt was toppled from power in August 1983.

Allan Nairn, a reporter who was due to have given evidence at the trial until the Guatemalan government stepped in to prevent him, has documented some of these massacres. There was nothing clandestine about them; they were designed to shock. Whole populations were marched into village squares and shot or strangled. Women and girls testified to being systematically raped by soldiers.

About 70 witnesses gave personal accounts to the trial. Pedro Chávez Brito, 41, told of the attack on his village on 4 November 1982. They killed his mother. He hid with his pregnant sister and two children, including a newborn baby, among the chickens, but the soldiers found them. His sister begged for their lives, but the military tied her up and set the house on the fire, killing about ten family members. Chávez survived only by hiding under some wood, ‘like an animal’, naked and without food, for eight days.

At the time, Ríos Montt defended what was going on in a way reminiscent of US justifications for attacks on Vietnamese villages: ‘Look, the problem of the war is not just a question of who is shooting. For each one who is shooting there are ten who are working behind him.’ Ríos Montt had the active support of President Reagan, whom he met in December 1982. Reagan saw Guatemala as a proxy battleground in the cold war. He said that Ríos Montt was ‘totally dedicated to democracy’ and had been given a ‘bum rap’ on human rights issues. Perhaps he’d been persuaded by the US ambassador, who earlier in the year said that the ‘killings have stopped’.

While the trial’s verdict means that the 86 year-old ex-dictator should spend the rest of his life in jail, it also has wider implications. It’s the first domestic conviction of a former head of state on genocide charges, and a milestone in Guatemala’s faltering progress towards cleaner politics. It provides a degree of justice to Mayan villagers, who nevertheless remain deeply impoverished and marginalised.

More broadly, it was a trial of Guatemala’s political establishment. The current president, Otto Pérez Molina, at one point denied there had been genocide and tried to stop the trial, allowing it to continue only as long as he wouldn’t be drawn into it. Yet it was inevitable that he would, as he had been the commander in charge of army units who carried out some of the massacres. Will he face prosecution when his presidential immunity ends in 2016?