Guatemala's Constitutional Court on Monday struck down the 80-year sentence given to former dictator Efrain Rios Montt as well as his conviction for genocide and war crimes.
The 3-2 ruling annulled all proceedings that took place after the trial was temporarily halted on 19 April due to a technicality, overturning the 10 May conviction but leaving most of the trial and testimony intact.
It was not immediately clear whether the proceedings from 19 April could be repeated, nor whether Rios Montt, 86, would remain in prison.
"The sentence is hereby annulled" on an appeal from Rios Montt's attorneys, said the Constitutional Court's spokesman Martin Guzman.
The court said the lawyers' claim of a procedural error during Rios Montt's trial had standing and as such struck down the conviction and sentencing.
The court said the latter part of the trial had to be voided because it resumed under a procedural error when the court that convicted him refused to review a recusal put forth by defense attorney Francisco Garcia.
Rios Montt was rushed to a military hospital a week ago after fainting in court before a hearing on reparations for victims, his lawyer said.
Rios Montt's conviction made him the first Latin American ex-dictator to be convicted of trying to exterminate an entire people, during a brief but particularly gruesome stretch of a war that started in 1960, dragged on for 36 years and left around 200,000 people dead or missing.
Under his rule, the army carried out a scorched earth policy against indigenous peoples, accusing them of backing rebel forces.
Rios Montt and his former intelligence chief Jose Rodriguez were charged with ordering the army to carry out 15 massacres that left 1,771 Maya Ixil Indians dead in Quiche in northern Guatemala. Rodriguez was acquitted.