The highest criminal court in Texas has halted the scheduled execution of Bernardo Tercero, a Nicaraguan man convicted of murdering a high school teacher while robbing a dry cleaning store in 1997.

Texas had intended to execute Tercero on Wednesday evening, nearly two decades after he had been sentenced to death by a jury in Harris County. On Tuesday, the Texas Court of Criminal Appeals said in an order that it was stopping the execution to allow a trial court to review Tercero’s claim that authorities “presented false testimony at his trial.”

An attorney for Tercero submitted an affidavit from a witness in the case who said that she had falsely testified that Tercero discussed shooting Robert Berger, the man killed during the 1997 robbery. During his trial, Tercero testified that he and Berger — who was in a dry cleaning shop with his three-year-old daughter — had struggled over the gun before it accidentally discharged.

The planned execution of Tercero had drawn condemnation from outside the United States.

Denis Moncada, Nicaragua’s ambassador to the Organization of American States, told Agence France-Presse that since his country has no death penalty, “it seems pathetic to be on the verge of a Nicuaraguan citizen’s execution.” He also said Nicaraguan President Daniel Ortega had asked the United States to spare Tercero’s life.

Last week, the Inter-American Commission on Human Rights said it determined that the United States had violated Tercero’s rights, saying that as a foreign national, Tercero should have been able to contact a consulate and seek assistance.

The organization also said it concluded that during Tercero’s prosecution:

his court-appointed counsel committed serious mistakes that affected his right to defense, especially taking into account the applicable standards in a case involving the death penalty. The Commission also concluded that he did not have a possibility to have his sentence effectively reviewed due to the limitations imposed by federal laws and the interpretation of the national courts.

Tercero had petitioned for relief multiple times in various courts, eventually asking the U.S. Supreme Court last year to review his case, according to the office of Ken Paxton, the Texas attorney general. The justices declined to review the case.

Nine judges sit on the Texas criminal appeals court. Judge Lawrence E. Meyers is listed as the only dissent in the order.

The state of Texas currently has six executions scheduled to take place by the end of the year. There have been 19 executions so far this year in the United States, 10 of them in Texas.