SOUTH CAROLINA (WTVO) — Four death row inmates won a legal victory against the state of South Carolina when a judge ruled that the methods that would be used to kill them consisted of “torture.”

On Tuesday, a judge ruled that the state’s newly created execution firing squad, as well as its use of the electric chair, are unconstitutional.

Judge Jocelyn Newman heard argumnets from lawyers who said that the prisoners would feel terrible pain whether their bodies were “cooking” by electricity or heart stopped by a marksman’s bullet — assuming they are on target.

Attorneys for the state countered with their own experts who said death by the yet-to-be-used firing squad or the rarely used electric chair would be instantaneous and the condemned would not feel any pain.

The state Supreme Court had ordered Newman to issue her decision within 30 days, with further appeals all but certain. Officials with the state Corrections Department told The Associated Press on Tuesday that the agency was “assessing the ruling.”

From 1995 to 2011 — when the state’s last execution was performed — South Carolina carried out the death penalty with lethal injections on 36 prisoners. But, as the state’s supply of lethal injection drugs expired in 2013, an involuntary pause in executions resulted from pharmaceutical companies’ refusal to sell the state more.

Condemned inmates technically had the choice between injection and electrocution, meaning that opting for the former would in essence leave the state unable to carry out the sentence.

Last year, Democratic Sen. Dick Harpootlian and GOP Sen. Greg Hembree, both of whom previously served as prosecutors, again argued in favor of adding the firing squad option.

“The death penalty is going to stay the law here for a while. If it is going to remain, it ought to be humane,” Harpootlian said, positing that the firing squad provided a more humane alternative than electrocution, if executions were to continue in the GOP-dominated state.

The ultimately approved measure, signed into law by McMaster last year, made South Carolina the fourth state in the country to allow use of a firing squad, and made the state’s electric chair — built in 1912 — the default method for executions, thereby giving prisoners a new choice.

During last month’s trial, a Corrections Department official said he devised the firing squad protocols after consulting a prison official in Utah, location of the only three inmates to die by firing squad since 1977. Colie Rushton, the department’s security director, testified the .308 Winchester ammunition to be used is designed to fragment and split up in the heart to make death as fast as possible.

Much of the rest of the trial was each side calling its own experts to detail whether inmates feel any pain before they die.

In her ruling, Newman relied on this testimony, including two physicians who said that an inmate “is likely to be conscious for a minimum of ten seconds after impact.” During that time, the judge wrote, “he will feel excruciating pain resulting from the gunshot wounds and broken bones,” sensation that “constitutes torture” as it is “exacerbated by any movement he makes, such as flinching or breathing.”

Dr. Jonathan Arden, who formerly led the Washington D.C. Medical Examiner’s office, testified that the electric chair caused “effects on parts on the body, including internal organs, that is the equivalent of cooking.”

Just three prisoners in South Carolina have chosen the electric chair since lethal injection was made available in 1995.

The Associated Press contributed to this report.