A Muslim man facing execution, Domineque Ray, requested the presence of his spiritual advisor, an imam, as he took his last breath. The Alabama prison where he was sentenced denied this request, saying they would only allow the presence of their own Christian chaplain. Ray’s imam, Yusef Maisonet, would have to watch from another room.

Ray challenged the prison officials’ decision in a case that went all the way up to the U.S. Supreme Court, where the execution was allowed to go forward by a 5-4 vote. Ray was executed on Thursday night as planned. His imam watched from behind glass.

The case is raising the ugly specter of a violation of the Establishment Clause of the First Amendment. Critics say the Alabama prison officials showed religion preference by refusing to allow a Muslim the comfort of a spiritual leader of his own religious tradition — a privilege a Christian would have been afforded. The four dissenting Justices agreed. “The clearest command of the Establishment Clause” is that “one religious denomination cannot be officially preferred over another,” Justice Elena Kagan wrote. “But the State’s policy does just that.”

Prison officials contended that allowing an imam in the room raised security concerns. “Why couldn’t Ray’s imam receive whatever training in execution protocol the Christian chaplain received? The state has no answer.” the dissent said. “Why wouldn’t it be sufficient for the imam to pledge, under penalty of contempt, that he will not interfere with the State’s ability to perform the execution? The State doesn’t say.”

The conservative majority said little about their vote to allow the execution to go ahead as planned, citing what they considered to be the last-minute nature of the request as a reason. “Because Ray waited until January 28, 2019 to seek relief, we grant the State’s application to vacate the stay,” the court wrote.

Alabama state law explicitly says that an inmate’s spiritual advisor of choice “may be present at an execution.”

Ray was in prison for the 1995 rape and murder of a 15-year-old girl named Tiffany Harville. Alabama Attorney General Steve Marshall considered the execution to be Ray’s “long-delayed appointment with justice,” according to local media reports.

Ray declined to have the prison’s Christian chaplain in the room with him when he was executed.