Updated

Guatemala's top court overturned former dictator Efraín Ríos Montt's genocide conviction, ordering that the trial be taken back to the middle of the proceedings.

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

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

The ruling came 10 days after a three-judge panel convicted the 86-year-old Ríos Montt 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 Ríos Montt knew about the slaughter of at least 1,771 Ixil Mayans in the western highlands and didn't stop it.

The tribunal sentenced the 86-year-old former general to 80 years in prison, drawing cheers from many Guatemalans. It was the first time a former Latin American leader was convicted of such crimes in his home country and the first official acknowledgment that genocide occurred during the war — something the current president, retired Gen. Otto Pérez Molina, has denied.

Ríos Montt's lawyers immediately filed an appeal, and he spent three days in prison before he was moved to a military hospital, where he remains.

The top court on Monday said 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 told The Associated Press by telephone that he would seek the former dictator's freedom on Tuesday.

"There is no alternative," Garcia said. "The court has made a legal resolution after many flaws in the process. Tomorrow we will ask that they liberate the general, who is being imprisoned unjustly."

Representatives of the victims who testified against Ríos Montt couldn't be immediately reached for comment.

The proceedings, which started in March, had been whipped back and forth ever since April 18, when a Guatemalan judge ordered that the trial should be restarted just as it was nearing closing arguments.

Judge Carol Patricia Flores had been recently reinstated by the Constitutional Court after being recused in February 2012. She ruled that all actions taken in the case since she was first asked to step down were null, sending the trial back to square one.

The next day, April 19, the tribunal hearing the oral part of the trial asked the Constitutional Court to decide if the proceedings should continue.

The trial was suspended for 12 days amid appeals and at times appeared headed for annulment. But it resumed April 30, and on May 10 the three-judge tribunal found Ríos Montt guilty after more than 100 witnesses and experts testified about mass rapes and the killings of women and children and other atrocities committed by government troops. Ríos Montt ruled Guatemala in 1982-83 following a military coup.

Survivors and relatives of victims had sought for 30 years to bring punishment for Ríos Montt. For international observers and Guatemalans on both sides of the war, the trial was seen as a turning point in a nation still wrestling with the trauma of a conflict that killed some 200,000 people.

The defense constantly claimed flaws and miscarriages of justice.

Courts solved more than 100 complaints and injunctions filed by the defense before the trial even started.

Ríos Montt's defense team walked out on April 18, arguing that they couldn't continue to be part of such a bad proceeding. When the three-judge tribunal resumed the trial, it ordered two public defenders to represent Ríos Montt and his co-defendant, Jose Rodríguez Sánchez.

Ríos Montt rejected his public defender and instead brought in Garcia, who was expelled earlier by the tribunal but reinstated by an appeals court.

Garcia had earlier been ordered off the case after he called for the three judges on the tribunal to be removed from the proceedings. He kept trying to have the judges dismissed. And the Constitutional Court ruled Monday that the trial should have been suspended while his appeal was heard.

The trial "was unlawfully reopened," Garcia said at the time.

Based on reporting by The Associated Press.

Follow us on twitter.com/foxnewslatino
Like us at facebook.com/foxnewslatino