Texas death row inmate John Henry Ramirez, 38, was executed Wednesday, even though efforts were made by a district attorney to stop his lethal injection.

The 38-year-old, who was convicted of killing Pablo Castro, 46, in 2004, as he took out the trash while working at a convenience store in Corpus Christi, was executed at the state penitentiary in Huntsville. His case redefined the role of spiritual advisers in death chambers across the U.S., reported the AP News.

The U.S. Supreme Court sided with Ramirez in March. It said that states in the U.S. must accommodate the wishes of death row inmates who want to have their faith leaders pray and touch them while they are executed.

When he was in the execution chamber, Dana Moore, his spiritual adviser, placed his right hand on the prisoner's chest and held it there. Moore offered a brief prayer with his back to witnesses. He prayed, “Look upon John with your grace, and grant him peace, grant all of us peace.” As his prayer ended, Ramirez responded, “Amen.”

Following the prayer, Ramirez addressed five of Pablo's relatives, including four of his children. They watched him through a window which was a few feet away from him. He said that he had regret and remorse, and said, "This is such a heinous act. I hope this finds you comfort. If this helps you, then I am glad." He hoped in some shape or form "this helps you find closure.”

Ramirez also expressed love to his wife, son and friends. He concluded by saying that he fought a "good fight, and I am ready to go.” He took several short breaths then started snoring after being injected by the lethal dose of pentobarbital. Within a minute, all movement stopped and he was declared dead 14 minutes later, at 6. 41 p.m.

Ramirez robbed Pablo of $1.25 then stabbed him 29 times, according to prosecutors. His murder happened during a series of robberies conducted by Ramirez and two women after a three-day drug binge. He fled to Mexico, but was arrested three and a half years later.

He challenged state jail rules that prevented his pastor from touching him and praying aloud during his execution. He said that his religious freedom was being violated. His challenge led to his execution being delayed.

The Texas Board of Pardons and Paroles on Monday unanimously declined to commute his death sentence to a lesser penalty. According to his lawyer, Ramirez had exhausted all possible appeals. He was the third inmate put to death 2022 in Texas, reported ABC News.

After the execution, Pablo's son, Aaron Castro, issued a statement, according to CNN. He said in part that God is the only "judge, jury, and verdict in the end for all of us. Who are we to hold hate, anger, and vengeance on our mind.”

Representation image. Pixabay.