If countries were ranked by lawlessness, Guatemala would score near the top. The country is ridden by crime and corruption and has one of the highest murder rates in the world. While many of its neighbors in Latin America have poor human rights records, Guatemala is the only country in the Western Hemisphere where it would be appropriate to use the word genocide to describe what has occurred there since World War II. Until recently, prosecutions and convictions for murder were infrequent. In a handful of cases, people who had committed human rights abuses against prominent persons were prosecuted successfully, but those responsible for the genocidal violence directed against the country’s Mayan Indian population in the early 1980s have never been brought to trial.

All that began to change following the appointment of Claudia Paz y Paz as Guatemala’s attorney general in December 2010. In addition to tackling corruption and organized crime related to drug trafficking, and sharply increasing the conviction rate in murder trials, Paz y Paz launched a number of cases against those who had committed political violence—including, most notably, General Efraín Ríos Montt, who was president of Guatemala when the worst violence took place. But now Guatemala’s Constitutional Court has ruled that Claudia Paz y Paz must step down in May, seven months before her four-year term is scheduled to be completed in December—a move that seems aimed at derailing her courageous effort to return the country to the rule of law.

Paz y Paz, now forty-six years old, is a lawyer with a background in criminal law and human rights work, including service with the human rights office of the Catholic Archdiocese of Guatemala City. It was with this background that she set out as Attorney General to rectify some of the worst abuses of Guatemala’s past, spearheading the prosecution of Ríos Montt, who was the country’s president from March 1982 to August 1983, for genocide and crimes against humanity. The trial was historic for including extensive testimony by members of the Ixil, an ethnic group that suffered the most grievous violence and that were apparently targeted on the basis of their ethnicity. Ríos Montt was convicted on May 10, 2013. But ten days later, that verdict, and a portion of the trial leading to it, were annulled on procedural grounds by the Constitutional Court. The eighty-seven-year-old Ríos Montt is supposed to be retried in 2015, though whether that trial will take place is far from certain.

Now the same court has ruled that Claudia Paz y Paz must step down in May, ostensibly on technical grounds, because the court had disqualified another lawyer who assumed the post of Attorney General in May 2010, prior to the appointment of Paz y Paz. The court seems to imply that Paz y Paz was only filling in for the unexpired portion of her predecessor’s term. The Court’s two-and-a-half page decision does not explain why it chose to ignore Article 251 of the Gautemalan Constitution, which states that only the president can remove the attorney general:

The General Prosecutor of the Nation serves four years in the exercise of his functions and shall have the same privileges and immunities as the judges of the Supreme Court of Justice. The President of the Republic shall be able to remove him for a duly established justified cause.

Though Paz y Paz has said she will seek to have the court reverse its decision, it is hard to see how this is possible.

The ruling to limit Paz y Paz’s term as Attorney General sends a clear signal. During the trial of Ríos Montt, it became clear that there were entrenched forces in Guatemala that strenuously opposed acknowledgment that what took place in the early 1980s constituted genocide and, therefore, opposed conviction of Ríos Montt for that crime. That opposition had been pressed by CACIF, Guatemala’s leading business organization, in an intense public campaign that preceded the annulment of Ríos Montt’s conviction. The decision to remove Paz y Paz shows that these forces have prevailed. Those concerned that Guatemala would suffer embarrassment if former government officials were prosecuted for crimes against humanity apparently did not recognize that other countries that have come to terms with their past—most notable Germany, where thousands of Nazi war criminals were prosecuted in the country’s own courts following the international trials at Nuremberg—have thereby gained in stature.

Another source of hostility to the Attorney General has been her vigor in prosecuting corruption. These investigations have antagonized many government officials. Her supporters in Guatemala are mainly members of the country’s beleaguered human rights community and members of the country’s large but politically marginalized indigenous population, who have applauded her prosecution of crimes in which they were the primary victims. President Otto Perez Molina, a former military leader whose own role in the country’s political violence three decades ago is obscure, did not seem to take a stand for or against Paz y Paz. At times the President and the Attorney General have collaborated and at other times they have been on opposing sides.

Admirers of Paz y Paz had thought the crucial test would come somewhat later in the year, when the question would be whether she would be reappointed for another four-year term. In Guatemala, the Attorney General is appointed by the President from among six candidates designated by a nominating commission. The nominating commission includes the deans of the country’s law schools, and in an indication of how politically significant this process has become, a number of new law schools—with limited educational programs—have been created recently. That way, their “deans” can expect to take part in nominating candidates.

Among the Attorney General’s accomplishments are her successful prosecutions and convictions of a number of military who were at lower levels than Ríos Montt, for crimes against humanity in Guatemala’s thirty-six-year civil war. (The war officially ended with a 1996 peace agreement.) Those convictions suggested that Guatemala was following the lead of other Latin American countries, including Argentina, Chile, Peru, and Uruguay, where the perpetrators of such crimes are being brought to justice. Had she been allowed to finish her term, Paz y Paz could have consummated these achievements by preparing a renewed prosecution of the former dictator who was responsible for the highest level of violence in the western hemisphere since World War II.

By making it impossible for the Attorney General to prepare that case, the Constitutional Court has halted Guatemala’s progress on that path. Its legally questionable decision helps to deny Guatemala a historic opportunity to undue its reputation for lawlessness.