On Thursday, the Supreme Court ruled that a Texas death row inmate could have his spiritual adviser pray aloud and “lay hands” on him during his execution, setting new precedents that will apply to similar requests in other prisons across the country.

The 8-1 decision was written by Chief Justice John Roberts. A dissent was filed by Justice Clarence Thomas.

The case is the latest in which the court has been asked to weigh an inmate’s request for a religious accommodation during execution against the state’s desire to maintain security and safety in the chamber.

The case arose after the court agreed in September to postpone John Henry Ramirez’s execution while the justices considered his requests regarding his pastor. In Texas, a pastor is allowed in the cell, but he or she is not allowed to speak or physically touch the inmate.

In 2004, Ramirez was found guilty of robbing and murdering Pablo Castro in a convenience store parking lot, stabbing him 29 times. According to the Texas attorney general’s office, he also robbed a second victim at knifepoint and fled to Mexico, evading arrest for three and a half years.

Ramirez’s death sentence remains unchanged as a result of the ruling.

A lawyer for Ramirez argued that Texas’ policy violates the inmate’s rights under the federal Religious Land Use and Institutionalized Persons Act of 2000, despite the fact that he did not argue for his innocence. The government cannot substantially restrict an inmate’s religious exercise unless it can demonstrate that it is the least restrictive means of achieving the government’s goal, according to federal law.

Ramirez is likely to succeed in demonstrating that Texas’ policy “substantially burdens his exercise of religion,” according to Roberts, who wrote for the majority, and that the state has not done enough to show that it has a compelling reason for its policy. “A rich history of clerical prayer at the time of a prisoner’s execution, dating back well before the founding,” the chief said. While audible prayer may pose a risk of interfering with the procedure, he believes the state could impose reasonable restrictions, such as “limiting the volume” of the prayer or requiring silence at critical points. Similarly, he claimed that spiritual advisers are currently allowed to stand three feet away from the gurney in the prison.

Ramirez’s minister has been Rev. Dana Moore of the Second Baptist Church in Ramirez’s hometown of Corpus Christi, Texas. Moore’s presence in the execution chamber, audibly praying and laying hands on him in the final moments of his life, is deeply rooted in the inmate’s faith.

Ramirez was sentenced to death for “brutally murdering a father of nine for pocket change,” according to Texas Solicitor General Judd Stone, who also claimed that Ramirez had only recently asked his pastor to lay hands on him and speak up in prayer. He told the justices that it was past time to “put an end to these tactics,” which allow prisoners to postpone executions for months or years while legal challenges are resolved.

Justice Clarence Thomas dissented, detailing the circumstances of Ramirez’s crime and charging that Ramirez made his claims to simply delay a sentence “lawfully imposed” by Texas. Thomas has been hospitalized this week with an infection, according to the court.

The majority should have denied Ramirez the opportunity to “manipulate the judicial process,” according to Thomas, the court’s senior conservative justice. He claimed that the inmate’s lawyer had “abusively” used the federal law at issue, and that the victim’s family members would now suffer “recurrent emotional injuries.”

“Congress created a powerful tool in RLUIPA to protect prisoners’ sincerely held religious beliefs,” Thomas said, but “like any tool, it can be misused.”

Previously, a divided federal appeals court had allowed Ramirez’s execution to proceed, despite one judge’s dissent that the execution should be halted to allow the courts to consider the claims.