It's difficult to say with certainty why the Supreme Court on Thursday night stopped the execution of a Buddhist inmate in Texas because he was not allowed a spiritual adviser by his side, when last month it approved the execution of a Muslim inmate in Alabama under the almost exact circumstances.
But the obvious place to start is new Justice Brett Kavanaugh, who seemed to have a change of heart.
Kavanaugh on Thursday was the only justice to spell out his reasoning: Texas could not execute Patrick Murphy without his Buddhist adviser in the room because it allows Christian and Muslim inmates to have religious leaders by their sides.
"In my view, the Constitution prohibits such denominational discrimination," Kavanaugh wrote.
But Kavanaugh was on the other side last month when Justice Elena Kagan and three other justices declared "profoundly wrong" Alabama's decision to turn down Muslim Domineque Ray's request for an imam to be at his execution, making available only a Christian chaplain.
"That treatment goes against the Establishment Clause's core principle of denominational neutrality," Kagan wrote then.
Kavanaugh and the court's other conservatives did not address Kagan's argument, saying only that Ray had brought his challenge too late.
Kavanaugh said in a footnote Thursday he was satisfied with the timing of Murphy's litigation. But there was little difference in when Ray and Murphy brought their requests; if anything, it appears Ray was quicker than Murphy.
Some critics of the court wondered if the difference was one of race and religion. Murphy is white and turned to Buddhism in prison. Ray, who was executed within hours of the court's decision Feb. 7, was black.
But the court in just the last few years has ruled for Muslim petitioners who claimed discrimination: an inmate who was not allowed to grow a short beard because of prison policies, and a woman who was denied a job at Abercrombie & Fitch because of her hijab.
Ilya Somin, a law professor at the Antonin Scalia Law School at George Mason University and a sharp critic of the court's decision in Dunn v. Ray, said the most logical explanation is the court was stung by the barrage of criticism it received from the left and the right.
The justices "belatedly realized they had made a mistake; and not just any mistake, but one that inflicted real damage on their and the court's reputations," Somin wrote on the Volokh Conspiracy blog.
"Presented with a chance to 'correct' their error and signal that they will not tolerate religious discrimination in death penalty administration, they were willing to bend over backwards to seize the opportunity, and not let it slip away."
Deepak Gupta, a Washington lawyer who argues before the court and called the Ray decision "indefensible," tweeted: "This is how the Supreme Court tries to erase a very recent and obvious moral error without admitting error. Is the Alabama case materially different? They don't say."
It is not clear from the ruling what role Chief Justice John Roberts and Justice Samuel Alito, who were in the majority in the Ray case, played in the Murphy case. They did not join Kavanaugh's opinion, nor did they note, as Justices Clarence Thomas and Neil Gorsuch did, that they would have allowed the execution to proceed.
Somin said he is "fairly confident Alito and Roberts switched" because they did not record themselves as objecting, as Thomas and Gorsuch did.
"In a high-profile case like this, it would be strange for some justices to clearly indicate their dissent, while others who agreed with that stance kept silent and thereby created the impression they agree with the majority," Somin said in an email.
But that is not always the case, and Kavanaugh plus the dissenters in the Ray case would have been enough to force the outcome in the Murphy case.
The order stayed Murphy's execution until the court decides to take up the case on its merits or Texas "permits Murphy's Buddhist spiritual advisor or another Buddhist reverend of the state's choosing to accompany Murphy in the execution chamber during the execution."
The Becket Fund for Religious Liberty, which filed a brief on Murphy's behalf, said it attempted to disentangle the religious liberty issue from the last-minute attempts to stop executions that irritate the court's conservative majority.
"This particular appeal does not present a challenge to the constitutionality of the death penalty, nor is it a challenge to Texas' execution of Murphy," the brief argues. "This is instead a challenge to the conditions of Murphy's confinement immediately prior to his execution."
Becket's First Amendment argument hinged on a point that often separates the court's liberals and conservatives.
Ray's lawyers, and the appeals court that at first held up his execution, said Alabama's policy of only employing a Christian chaplain and making him the only cleric available at executions violates the prohibition on government endorsement of one religion over another.
Becket and Murphy's lawyers argued that the constitutional right at issue was the inmate's ability to practice his religion.
“The right of a condemned person to the comfort of clergy - and the rights of clergy to comfort the condemned - are among the longest-standing and most well-recognized forms of religious exercise known to civilization,” Becket’s brief said.