Domineque Ray will soon be executed by the state of Alabama, and he wants his imam to be in the death chamber when he is killed. It’s not an absurd request: Alabama provides death row inmates with a Christian chaplain to pray with them just before they are given a lethal injection. But Ray is a devout Muslim, and he asked that a spiritual adviser of his own faith accompany him in the chamber. Alabama refused. The state insisted that Ray either accept the Christian chaplain or be killed alone. It scheduled his execution for Thursday evening.

On Wednesday afternoon, the 11th U.S. Circuit Court of Appeals blocked Alabama from killing Ray, ruling that the state’s refusal to let his imam attend the execution likely violates the Establishment Clause of the First Amendment. The court’s remarkable decision correctly accuses the state of engaging in flagrant religious discrimination, favoring Christianity over Islam and prioritizing a swift death over constitutional rights. It also potentially tees up a Supreme Court battle that will test the conservative majority’s ostensible commitment to religious freedom. If the Republican-appointed justices reverse the 11th Circuit, it will be hard to avoid the conclusion that their zeal for capital punishment outweighs their commitment to religious liberty.

Perhaps the most galling aspect of Ray’s case is how hard he must fight to obtain so little. Ray has exhausted his death sentence appeals and now only seeks to die with a measure of spiritual comfort. Alabama automatically gives Christian inmates this benefit: Since 1997, the Rev. Chris Summers has witnessed nearly every execution in the state, kneeling and praying with prisoners just before they are killed. Ray only seeks to substitute Summers with his imam, Yusef Maisonet of Mobile’s Masjid As Salaam, who has provided religious ministry to the prison’s Muslim inmates since 2015. But Alabama will not let Maisonet into the execution chamber—because, it asserts, he is “unfamiliar with the execution process and with the practices and safety concerns of the prison.”

In an opinion by Judge Stanley Marcus, the 11th Circuit spurned this explanation. Maisonet, after all, has already been screened by the prison and permitted to regularly visit Muslim inmates for years. Alabama could not explain why, exactly, it did not think Maisonet could be trusted to attend the execution. To Marcus, its hazy excuse looks a lot like religious discrimination. “What is central to Establishment Clause jurisprudence,” he wrote, “is the fundamental principle” that the government may not “pass laws or adopt policies that aid one religion or prefer one religion over another. And that, it appears to us, is what the Alabama Department of Corrections has done here.” He continued:

The central constitutional problem here is that the state has regularly placed a Christian cleric in the execution room to minister to the needs of Christian inmates, but has refused to provide the same benefit to a devout Muslim and all other non-Christians. Alabama appears to have set up precisely the sort of denominational preference that the Framers of the First Amendment forbade.

To survive constitutional scrutiny, then, Alabama’s policy must be narrowly tailored to support a compelling government interest. And, according to Marcus, there appear to be “other less restrictive means to accomplish” a secure execution—like ensuring Maisonet learns how to “undertake this solemn and sensitive task.” Alabama may not simply declare that it is unable to “provide the same faith-based benefits to Christians and non-Christians alike.” It must provide evidence that the “perceived risks” of Maisonet’s attendance have some basis in reality. And because it has not, the Establishment Clause forbids Ray’s execution.

Alabama will almost certainly appeal Wednesday’s order to the Supreme Court, where the conservative bloc will face a conundrum. These justices vigorously support capital punishment and typically vote against stays of execution. But they also purport to champion religious liberty—primarily for Christians, but also (sometimes) for Muslims. If the Supreme Court’s conservatives recognize that Alabama is engaging in flagrant religious discrimination and vote to keep the execution on hold, they will deserve credit for consistency. If they vote to let Ray be killed without the presence of his imam, however, their paeans to religious freedom will be difficult to take seriously. The First Amendment protects people of all faiths—even in their final moments on the gurney, before the state extinguishes their lives for good.