John Ramirez, a Texas inmate who won a legal battle with the Supreme Court to have his pastor pray aloud over him and place his hands on him in the execution chamber, was executed by lethal injection Oct. 5.

Ramirez, 38, was given the death sentence for the stabbing murder of a convenience store clerk during a 2004 robbery.

Just before Ramirez was executed at the state penitentiary in Huntsville, Texas, the Texas Catholic Conference said in a tweet that it lamented his scheduled execution. The public policy arm of the state's bishops described the death penalty as "an attack on the inviolability and dignity of the person."

The Catholic conference also prayed for the victim's family and all involved in the case.

The Catholic Mobilizing Network similarly said in a tweet that it was praying for Ramirez and his victim, Pablo Castro, and for Castro's family. The group, which advocates for an end to the death penalty, also said it was praying for members of the media, prison staff and all who would be present at Ramirez's execution.

"No person should have to witness or take part in the killing of a fellow human being," the group tweeted.

Dana Moore, pastor at Second Baptist Church in Corpus Christi, Texas, was alongside Ramirez in the prison's execution chamber.

According to The Associated Press, Moore placed his right hand on Ramirez's chest and held it there for the duration of the execution. With his back to witnesses, the pastor said a brief prayer asking God to "look upon John with your grace. Grant him peace. Grant all of us peace." Ramirez responded: "Amen."

After the prayer, Ramirez addressed five of Castro's relatives, including four of his children, who attended the execution as witnesses. "I have regret and remorse," he said, adding that he hoped his death would help them find comfort.

Texas officials initially denied Ramirez's request to have a pastor place his hand on him and pray aloud over him during his execution, prompting the religious liberty case that came before the U.S. Supreme Court last November.

In an 8-1 decision this March, the justices said Ramirez's request should be granted but during oral arguments, it was not clear how the court would rule. Some of the  justices questioned if allowing the inmate's request would open up other appeals or impose a safety risk.

Sister Helen Prejean, a Sister of St. Joseph, who is a longtime opponent of the death penalty, tweeted after the court's decision that she was proud to have been part of an amicus brief siding with the prisoner.

"There was no legitimate reason for Texas to restrict these dignified, prayerful actions in the execution chamber," she said.

Sister Prejean was joined in the brief by Sister Barbara Battista, a Sister of Providence of St. Mary of the Woods in Indiana, and Benedictine Father Mark O'Keefe and other faith leaders. They said their presence as spiritual advisers during executions is "critical to respecting the dignity and religious freedom rights of the prisoner."

The U.S. Conference of Catholic Bishops, joined by the Texas Catholic Conference, also filed an amicus brief in this case that said the role of spiritual advisers to prisoners "is of particularly grave importance at the moment of death."

The bishops said for the state to allow Ramirez spiritual assistance does not "render his execution a just act" or essentially give it a blessing. The state "should act with justice by sparing Ramirez's life," they added. "If it will not, it should allow him to seek the mercy of God at the moment of his death."

A specific law at issue in this case was the Religious Land Use and Institutionalized Persons Act, or RLUIPA, passed by Congress in 2000. The law forbids prisons from imposing a "substantial burden" on an inmate's faith, unless that burden is "in furtherance of a compelling governmental interest" and the prison uses "the least restrictive means of furthering that compelling governmental interest."