The Supreme Court’s liberals and conservatives seemed to disagree Monday on whether an Alabama inmate was entitled to a mental-health expert who would be on his side in fighting the state’s attempt to sentence him to death.

The justices were examining James McWilliams’s 1986 death sentence and an even older Supreme Court precedent. But their decision will be immediately relevant. The Arkansas Supreme Court recently stayed the execution of two men on its death row until the justices decide McWilliams v. Dunn.

[Arkansas attempts to executive eight before lethal injection drugs expire]

The U.S. Supreme Court ruled previously that poor defendants whose mental health might explain their criminal actions have a right to expert evaluation. Monday’s argument was about whether that expert should be on the defendant’s side, not just neutral.

Atlanta lawyer Stephen B. Bright, representing McWilliams, said the intent of the Supreme Court’s 1985 decision in Ake v. Oklahoma was clear: to ensure that poor defendants have a chance to have the kind of expert assistance that wealthy defendants and state prosecutors could afford.

“It at least gives the defense a shot, at least gives them one competent mental-health expert that they can talk to, understand what the issues are, present them as best they can,” Bright said.

But conservative justices said the Ake opinion was not so clear that more than a neutral expert was necessary. Perhaps intentionally so, said Justice Samuel A. Alito Jr.

“This is an opinion that is deliberately ambiguous, because there was probably disagreement among the members of the majority about how far they wanted to go,” Alito said.

Alabama Solicitor General Andrew L. Brasher acknowledged in response to Justice Ruth Bader Ginsburg’s questioning that almost all jurisdictions provide the kind of expert help to poor defendants that McWilliams seeks. But older cases should not be seen through “2017 eyes” but by what was required at the time.

McWilliams was convicted of the 1984 rape, robbery and murder of convenience store clerk Patricia Vallery Reynolds in Tuscaloosa, Ala. Before sentencing, a state psychologist who examined McWilliams said he had “organic brain damage” and records showed he had received psychotropic drugs in prison.

But all of that came just two days before sentencing, and defense lawyers requested a delay and professional help in deciphering what that meant for McWilliams’s case.

The judge refused and sentenced McWilliams to death.

Liberal Justices Sonia Sotomayor and Elena Kagan seemed convinced that the court’s decades-old ruling specifically called for more than just a neutral expert examining the defendant.

Kagan quoted what she called the “money sentence” in Ake as directing that “the state must assure the defendant access to a competent psychiatrist who will assist in evaluation, preparation and presentation of the defense.”

She tried to count all the times the opinion used the word “assist” and lost track, she said. She added: “It means somebody on the defendant’s side.”

Justice Stephen G. Breyer seemed to agree with that standard and said that “it seems to me that this defendant certainly did not get that help.”

As is often the case, it may be that Justice Anthony M. Kennedy holds the deciding vote.

He seemed to believe the Ake decision was ambiguous. But if the original decision meant a psychiatrist must be available and “then over time it becomes clear to us that that psychiatrist must be retained for the benefit of the defense only,” perhaps that is only a “refinement” of the clearly established right, not a completely new finding, Kennedy said. That suggested an easier path for Bright’s argument.

New Justice Neil M. Gorsuch seemed to side with Alabama, wondering how far expert help for the defense would have to extend. And he said that one way to understand what the Supreme Court meant in Ake was to look at what defense counsel had asked for. He said lawyers would have been happy with either a neutral psychiatrist or one on their side.

When Brasher agreed, Kagan responded in a way that seemed directed both at the lawyer and the new justice.

“I think that that would be a shocking way to interpret this court’s opinions,” she said. The way to interpret them, she said, is to look at what they actually require, regardless of what the lawyers who brought them asked for.