A Texas inmate whose life was spared hours before a scheduled execution last month says he was prepared to die.

William Speer, 49, was set to receive a lethal injection Oct. 26 at the state penitentiary in Huntsville. Instead, Texas' top criminal appeals court stopped the scheduled execution for the man condemned for killing another prisoner more than 26 years ago.

"It was shocking. I was just in awe," Speer told FOX 26. "I knew that when I went to sleep and woke up that I was going to be waking up to the trumpet sound, and I was going to be hearing holy God lord almighty."

Speer was condemned for strangling Gary Dickerson to death in July 1997 at the Telford state prison, located near New Boston in northeast Texas.

TEXAS MAN SET FOR EXECUTION AFTER KILLING FELLOW INMATE, VICTIM'S SISTER MAKES LAST-DITCH EFFORT TO SAVE HIM

TX death row inmate William Speer

Undated photo shows Texas inmate William Speer, whose execution planned for Oct. 26, 2023, for killing another prisoner more than 26 years ago was canceled. (Texas Department of Criminal Justice via AP)

Prosecutors said Speer killed Dickerson in a bid to join the Texas Mafia prison gang, which ordered the hit after mistakenly concluding Dickerson had informed authorities about tobacco it had tried to smuggle into the prison.

At the time of Dickerson's killing, Speer had been serving a life sentence for fatally shooting a friend’s father, Jerry Collins, at the man’s Houston area home. Speer was 16 then.

Dickerson's only living sibling at the time, sister Sammie Martin, and religious leaders had recently asked authorities to spare his life.

The appeals court granted the request by Speer's attorneys, alleging that prosecutors in his 2001 trial failed to present evidence about his troubled childhood, less than five hours before his scheduled execution.

"We have reviewed the application and find that (Speer’s) execution should be stayed pending further order of this Court," the appeals court wrote in its two-page order obtained by The Associated Press.

Speer’s lawyers said the stay order cannot be appealed to federal courts because it is a state law issue.

TX VOTERS REJECT PROPOSAL TO EXTEND JUDICIAL RETIREMENT AGE

Texas state capitol building

The Texas state Capitol building, in Austin on Feb. 28, 2022. The state's attorney general's office did not immediately respond for comment about the stayed execution. (Fox News - Paul Steinhauser)

"We are relieved that Will Speer will live to see another day so he can continue to spread his message of hope and healing in Texas prisons," Amy Fly, one of Speer’s attorneys, told the AP. "Will’s life of ministry, and his efforts to offer some measure of peace to his victims’ families, are an inspiration. We are grateful for the thousands of people, including faith leaders and his victims’ survivors, who told the State of Texas that Will’s life was worth saving."

Martin unexpectedly died the day following Speer's stayed execution. Her daughter, Kristina Harris, told FOX 26 her mom last spoke with Speer on the phone a week prior to her death. 

"We received a text message letting us know that he received a last-minute stay, and I think her reply was, 'I think, that's awesome,'" Harris said.

Lethal injection chamber

Wiliam Speer's execution was called off just hours before it was scheduled on Oct. 26, 2023. (Michael Macor/The San Francisco Chronicle via Getty Images)

CLICK HERE TO GET THE FOX NEWS APP

As for Speer, the man reportedly selected by the Texas Department of Criminal Justice to be the first inmate coordinator for a faith-based program offered to men on death row, he said God had a hand in saving his life.

"If God can change this guy right here, God can change anybody," he said.

The Associated Press contributed to this report.