Texas’ last scheduled execution of the year has been canceled.


On Tuesday, the Texas Court of Criminal Appeals stayed the Dec. 14 execution of Juan Castillo and sent his case back to the trial court to look into claims of false testimony.


Castillo, 36, was sentenced to death in the 2003 robbery and murder of Tommy Garcia Jr. in San Antonio, according to court records. Prosecutors said Castillo and three others planned to rob Garcia after luring him to a secluded area with the promise of sex with one of the women involved in the plan. But when Garcia tried to run, Castillo shot him, according to the accomplices.


One of the witnesses at his trial, Gerardo Gutierrez, bunked near Castillo at the Bexar County Jail and testified that Castillo had confessed to the crime in jail. But in 2013, Gutierrez signed an affidavit saying that he lied in his testimony “to try to help myself.”


Even though Castillo had already gone through appeals and lost, the Court of Criminal Appeals ruled on Tuesday that his case was now applicable for further review because of a nearly decade-old ruling. The court had previously held that it was a constitutional violation when the prosecution knowingly uses false testimony to obtain a conviction. And in a 2009 case, it went further to say that even if prosecutors are unaware testimony is false, it still violates a defendant’s due process rights.


“Although the present case involves unknowing, rather than knowing, use of testimony, we see no reason for subjecting the two types of errors to different standards of harm,” the court ruled.


Since the 2013 admission from Gutierrez came after this new precedent, Castillo’s execution was stopped. The prosecution argued against the stay, stating that Gutierrez’s testimony was corroborated by multiple other witnesses.


Castillo has had multiple execution dates set and stopped. In August, his September execution was rescheduled by the Bexar County district attorney because some of Castillo’s defense team was based in Houston, which was suffering from Hurricane Harvey flooding.


His execution was the only one remaining on the 2017 calendar in Texas. The state has executed seven people this year, the most in the country. Seven people were also put to death in Texas last year, and five executions are already scheduled in the first three months of 2018.


This article originally appeared in The Texas Tribune at https://www.texastribune.org/2017/11/28/texas-court-halts-last-execution-2017/. The Texas Tribune is a nonprofit, nonpartisan media organization that informs Texans — and engages with them — about public policy, politics, government and statewide issues.