Guatemala's former military leader Efrain Rios Montt has had his conviction for genocide and crimes against humanity overturned.
The constitutional court said the trial must go back to where it stood on 19 April this year and restart from that point.
On 10 May, General Rios Montt was convicted of ordering the deaths of 1771 people of the Ixil Maya ethnic group during his time in office in 1982-83. The 86-year-old was sentenced to 80 years in jail. He denies the charges.
On Monday, the constitutional court threw out all proceedings in the case after the April day when there was a dispute between two judges about who should hear the case, the BBC reports.
The ruling follows an appeal by General Rios Montt's defence lawyers, who argued that procedural errors had been committed.
The trial began in March and was beset by delays and even a temporary suspension.
During the hearings, dozens of victims gave harrowing testimony about atrocities committed by soldiers.
General Rios Montt became the first former leader to be found guilty of genocide by a national tribunal.
The BBC reports the decision to annul the sentence does not signal the end of the legal battle for the prosecution or for General Rios Montt, as both sides will now start preparing to return to court to replay the final few weeks of the trial.
An estimated 200,000 people were killed in Guatemala's 1960-1996 civil war, the vast majority of them indigenous Mayans.
The former general abandoned politics in 2012, after serving in Congress for a number of years. He is expected to leave the military hospital where he is being held and return to his home under house arrest.