The Supreme Court will hear a case about ineffective lawyers when it next meets for oral arguments at the end of the month, but the case also is wrapped up in the hot-button issues of the death penalty and illegal immigration.

Ayestas v. Davis has not received much attention from court-watchers anticipating a slew of blockbuster cases this term, but the justices' ruling on the dispute could have a lasting impact on many criminal and death penalty cases and the legal protections given to illegal immigrants.

A Texas court sentenced Carlos Manuel Ayestas, a Honduran man, to death in 1997 after his conviction for murdering Santiago Paneque during a burglary of her Houston home.

Ayestas appealed his conviction on the grounds that his trial lawyer failed to collect testimony from his family members who could have provided evidence to support his case. The Texas courts rejected Ayestas' appeals.

Then in 2009, Ayestas again appealed his case, this time with a different lawyer, and said his trial attorney failed to conduct a reasonable investigation that would have yielded "available and abundant" evidence of mitigating factors. Ayestas said that evidence would have revealed relevant information about his upbringing and that he suffered from early-stage schizophrenia, addiction, and other mental illnesses.

Ayestas's father was purportedly 20 years older than his mother when they met, and his dad fathered 22 children with several women. After fathering three children himself by the time he was 17, Ayestas traveled to the U.S. while telling his mother that he was headed to Guatemala. Along the way, Ayestas' family has said, he was abducted in Mexico and held for ransom.

A federal district court ruled against Ayestas' later appeal on a procedural matter, saying that Ayestas had not raised the new claims in earlier proceedings in the Texas state court. The 5th Circuit Court of Appeals agreed.

But a ruling from the Supreme Court may have helped breathe new life into Ayestas' case. The Supreme Court issued a 7-2 opinion in Martinez v. Ryan, written by Justice Anthony Kennedy in 2012, which said that an attorney's blunders in court proceedings after a conviction do not give the courts a reason to excuse procedural defaults.

Ayestas sought a rehearing in light of that decision and filed a motion for investigative assistance that he deemed "reasonably necessary" to prove his claims. The federal courts shot down his motion.

Now, the Supreme Court is looking to determine whether the investigative services Ayestas wants are "reasonably necessary" only if petitioners have prevailed in earlier proceedings of the sort that Ayestas lost.

At the time of Kennedy's opinion in Martinez v. Ryan, the late Justice Antonin Scalia dissented because he thought Kennedy was creating a constitutional right to effective counsel in collateral court proceedings, such as the later hearings on Ayestas' appeals.

"Despite the court's protestations to the contrary, the decision is a radical alteration of our habeas jurisprudence that will impose considerable economic costs on the states and further impair their ability to provide justice in a timely fashion," Scalia wrote in his 2012 dissent. "The balance it strikes between the finality of criminal judgments and the need to provide for review of defaulted claims of ineffective assistance of trial counsel grossly underestimates both the frequency of such claims in federal habeas, and the incentives to argue (since it is a free pass to federal habeas) that appointed counsel was ineffective in failing to raise such claims."

Justice Clarence Thomas joined Scalia's 2012 dissent.

Whether Scalia's successor, Justice Neil Gorsuch, shares the late justice's view or that of his former boss — Kennedy — could prove critical in determining the outcome and scope of the high court's decision in Ayestas. The court agreed to hear Ayestas less than one week before Gorsuch joined the high court.

A ruling in favor of Ayestas could provide convicts fighting death sentences with additional avenues to delay their executions. Whether that factor plays into the thinking of justices on the high court's ideological left, remains to be seen. But Justice Stephen Breyer has repeatedly called for the Supreme Court to review the constitutionality of the death penalty, and other justices on the high court's left-leaning bloc have routinely dissented from the high court's decisions allowing executions to proceed.

The Supreme Court will hear Ayestas when it next gathers for oral arguments Oct. 30.