The U.S. Supreme Court ruled in favor of a Texas death row inmate Wednesday, ordering a federal appellate court to reconsider providing funding for him to investigate previously unexplored evidence that he believes could toss out his death sentence.

The high court ruled unanimously to send the case of Carlos Ayestas — a 48-year-old Honduran national who was sentenced to death more than 20 years ago in the 1995 Houston murder and home burglary of a 67-year-old woman — back to the 5th U.S. Circuit Court of Appeals, which had denied requests for federal funding to look into Ayestas’ claims of mental illness and substance abuse.

Since his imprisonment, Ayestas has been diagnosed with schizophrenia, and he told an investigator before his trial that he had suffered from multiple head traumas and regularly drank alcohol and used cocaine, according to Ayestas’ filing to the court. But evidence about mental illness, brain injuries or drug use wasn't brought up during his 1997 punishment trial.

The defense at his original trial brought forth no witnesses, only providing documents from an English teacher in prison that said he was a good student, the brief said. Prosecutors, meanwhile, pushed for the death penalty, arguing Ayestas threatened to kill people who knew about the fatal beating and strangulation of the victim, Santiaga Paneque.

In his federal appeals years later, Ayestas’ lawyers sought funds they said were “reasonably necessary” to investigate the claims of mental illness and substance abuse because, they argued, if the issues were raised at trial, the jury may have been persuaded to opt for a lesser sentence. But the appellate court denied the request, saying Ayestas didn’t show a “substantial need” for the funding.

The Supreme Court ruled Wednesday that the lower court "did not apply the correct legal standard" in that decision. Justice Samuel Alito wrote for the court that "the Fifth Circuit's requirement that applicants show a 'substantial need' for the services is arguably a more demanding standard." Ayestas' case will now be sent back to the 5th Circuit for further proceedings.

The 5th Circuit, which covers Texas, Louisiana and Mississippi and politically leans heavily to the right, requires that poor inmates facing the death penalty show not only that there is a reasonable need for funding for their investigations but a substantial one. It’s a difference in words that the court picked at when it rejected Ayestas’ request.

Ayestas’ lawyers argued that the court’s strictness means Ayestas has to prove his claims to the court before he can get the resources to investigate them. But the 5th Circuit said there was no obligation for his trial lawyers to look into those areas and that any potential findings wouldn’t necessarily have affected his sentence because of the crime’s brutality and Ayestas’ threatening actions afterward.