Guatemala’s top court has thrown another curve into the genocide case of former autocratic leader Efrain Rios Montt, overturning his conviction and ordering that the trial be returned to the middle of the proceedings.

The ruling late Monday left in disarray a process that had been hailed as historic for delivering the first guilty verdict in a genocide case against a former Latin American leader.

Constitutional Court secretary Martin Guzman said the trial needs to go back to where it stood April 19 to address several appeal issues.

The ruling came 10 days after a three-judge panel convicted Rios Montt, 86, of genocide and crimes against humanity for his role in massacres of Mayans during Guatemala’s bloody, 36-year civil war. The panel found after two months of testimony that Rios Montt knew about the slaughter of at least 1,771 Ixil Mayans in the western highlands and did not stop it.

The tribunal sentenced the former general to 80 years in prison, drawing cheers from many Guatemalans.

Rios Montt’s attorneys immediately filed an appeal. He spent three days in prison before he was moved to a military hospital, where he remains.

The top court said Monday it threw out his conviction because the trial should have been stopped while appeals filed by the defense were resolved.

Defense lawyer Francisco Garcia Gudiel said by telephone that he would seek his client’s freedom Tuesday.

Representatives of the victims who testified against Rios Montt could not be immediately reached for comment.

The proceedings had been whipped back and forth since April 18, when a judge ordered that the trial should be restarted just as it was nearing closing arguments. The trial at times appeared headed for annulment. But it resumed April 30, and on May 10 the three-judge tribunal found Rios Montt guilty after more than 100 witnesses and experts testified about mass rapes, the killing of women and children, and other atrocities committed by government troops.

Rios Montt ruled Guatemala for a period in 1982 and 1983 after a military coup.

— Associated Press