(CNN) The Supreme Court on Thursday blocked the execution of an Alabama inmate, Willie B. Smith III, who said he wanted his spiritual adviser present in the execution chamber.
Alabama had asked the justices to reverse a lower court ruling and allow the execution to proceed without the adviser present in the chamber.
The exact vote count was unclear, although Justice Elena Kagan -- joined by Justices Amy Coney Barrett, Stephen Breyer and Sonia Sotomayor -- wrote to explain why they voted to block the execution.
Kagan said that the 11th US Circuit Court of Appeals was "right to bar Alabama from executing Smith without his pastor by his side" and she rejected security concerns put forward by the Alabama Department of Corrections.
"The law guarantees Smith the right to practice his faith free from unnecessary interference, including at the moment the State puts him to death," Kagan wrote.
She said Alabama could take "any number of measures" to make sure that a clergy member will act responsibly during an execution, including doing a background check on the minister.
Chief Justice John Roberts and Justice Brett Kavanaugh explained why they would have granted Alabama's request, citing the state's security concerns.
Justice Clarence Thomas did not join that opinion but he simply noted he too would have granted Alabama's request. Justices Samuel Alito and Neil Gorsuch were silent as to their vote.
Smith is on death row for the 1991 murder of 22-year-old Sharma Ruth Johnson, who he shot in the head as she swore not to reveal his crimes, according to court papers.
This marks the fourth time in two years the justices have been asked to consider religious liberty claims of inmates seeking to have their spiritual advisers present for their executions -- and the issue has bitterly divided the justices in the past.
In Smith's case, Alabama's Department of Corrections told the justices in court papers that its policy is necessary to "preserve the security and solemnity" of the execution.
The department does not allow any member of the public into the execution chamber but allows an outside spiritual adviser to visit with the inmate on the day of the execution in the prisoner's cell and immediately before the prisoner goes into the execution chamber. The spiritual adviser can witness the execution in the adjacent viewing room.
Smith's lawyers cited a federal law that prohibits the government from imposing a substantial burden on the religious exercise of a prisoner unless the government demonstrates that it is the least restrictive means of furthering a compelling government interest.
Smith's lawyers argued that Alabama had not considered less restrictive alternatives and noted that in recent federal executions the government has allowed a spiritual adviser of the inmate's choosing to be in the chamber.
The Supreme Court has grappled with similar cases in the past.
In 2019, Domineque Ray, a devout Muslim in Alabama, asked for his spiritual adviser to be present but at the time ADOC didn't employ any Muslim chaplains. The Supreme Court allowed the execution to proceed, citing concerns about the timeliness of the inmate's filings.
Kagan, joined by the other three liberals on the court at the time, called the decision "profoundly wrong" and said that Ray had put forward a "powerful claim" that his religious rights will be violated the moment the state puts him to death.
Six weeks later, a Buddhist prisoner in Texas sought similar relief. The court granted his request. At the time, Kavanaugh penned his own opinion joined by no other justice. He noted that while Texas allowed Christian or Muslim inmates to have a state-employed Christian or Muslim religious advisers present, it did not have any Buddhist advisers on staff.
"As this Court has repeatedly held, governmental discrimination against religion -- in particular, discrimination against religious persons, religious organizations, and religious speech -- violates the Constitution," Kavanaugh wrote.
He suggested a way forward for the states. They could allow all inmates to have a religious adviser of their religion in the execution room, or they could allow inmates to have a religious adviser only in the viewing room, not the execution room.
After that order, the Alabama Department of Corrections changed its protocols. Only Texas and Alabama currently have explicit bans on advisers in the actual chamber.
Eric Rassbach of the conservative Becket Fund for Religious Liberty praised the court's ruling in Willie Smith's case.
"If Willie Smith has to leave this world, he shouldn't have to leave it all alone," Rassbach said. "Prisoners should be allowed to make peace with their Maker in their final moments," he said.