Washington state’s Supreme Court ruled that the death penalty violates its Constitution.

The ruling Thursday makes Washington the 20th state to do away with capital punishment by legislative act or court decree. The justices said the “death penalty is invalid because it is imposed in an arbitrary and racially biased manner.” They ordered that people currently on death row have their sentences converted to life in prison.

"The death penalty is unequally applied — sometimes by where the crime took place, or the county of residence, or the available budgetary resources at any given point in time, or the race of the defendant," Chief Justice Mary Fairhurst wrote in the lead opinion.

She added: "Our capital punishment law lacks 'fundamental fairness.'"

Defense lawyers had long challenged the death penalty on those grounds, noting the state's worst mass murderers and serial killers, Green River killer Gary Ridgway among them, had received life terms, not death. In a 5-4 ruling in 2006, the justices rejected an argument from a death row inmate that he shouldn't be executed because Ridgway hadn't been executed.

Also see | Here's who is on death row in Washington

This time, death penalty critics were armed with more data about how capital punishment works, including a statistical analysis by University of Washington sociologists. Their report showed that although prosecutors were not more likely to seek the execution of black defendants, juries were about four times more likely to sentence black defendants to death.

"Now the information is plainly before us," Fairhurst wrote. "To the extent that race distinguishes the cases, it is clearly impermissible and unconstitutional."

Gov. Jay Inslee, a one-time supporter of capital punishment, had previously said no executions will take place while he’s in office and put a moratorium on the death penalty.

"Today's decision by the state Supreme Court thankfully ends the death penalty in Washington," Gov. Inslee tweeted. "This is a hugely important moment in our pursuit for equal and fair application of justice."

The ruling was in the case of Allen Eugene Gregory, who was convicted of raping, robbing and killing Geneine Harshfield, a 43-year-old woman, in 1996.

WATCH: Inslee reacts to Supreme Court ruling on death penalty

His lawyers, Neil Fox and Lila Silverstein, said the death penalty is arbitrarily applied and that it is not applied proportionally, as the state Constitution requires.

"However one feels about the propriety of capital punishment in theory, in practice the death penalty is imposed in an unfair, arbitrary, and racially biased manner," Silverstein said in a written statement. "The Supreme Court properly ruled the Washington Constitution does not tolerate such an unfair system."

Dozens of former state judges took the unusual step of urging the court to use Gregory's case to strike down capital punishment. Among them was former Justice Faith Ireland, who sided with the narrow majority in upholding capital punishment in 2006.

In Thursday's decision, the court did not rule out the possibility that the Legislature could come up with another manner of imposing death sentences.

"We leave open the possibility that the legislature may enact a 'carefully drafted statute' to impose capital punishment in this state, but it cannot create a system that offends constitutional rights," the opinion said.

The politics of the death penalty

The death penalty is an issue that does not break down party lines. Earlier this year, the state Senate passed a bill to repeal the death penalty with bipartisan support 26 to 22.

But there was also bipartisan opposition, and the legislation stalled in the state House.

“I don't think it has anything to do with Party and I understand and respect, particularly victims' families, a deep sense of conviction about this issue, but there is a growing consensus in Washington, in the United States and worldwide that it is simply time to move past the death penalty as a policy,” said Democratic Sen. Reuven Carlyle.

Carlyle has pushed the issue in Olympia for the past decade. Despite Thursday’s ruling by Washington’s highest court, he plans to reintroduce a bill to abolish the death penalty next session.

“The court took a gigantic step forward and it said the death penalty is inequitably and inconsistently applied in Washington state. It didn't say it's unconstitutional as a policy itself, so we do need to take that final practical step,” Carlyle explained.

Instead, the Supreme Court’s ruling stated the death penalty was unconstitutional as it’s being applied currently. Attorney General Bob Ferguson also urged lawmakers to take the next and final step to remove the death penalty from state statute, replacing it with life in prison without the possibility of parole.

While Carlyle believes the latest court ruling gives the effort new momentum, Washington prosecutors remain split. Snohomish County Prosecuting Attorney Mark Roe has said the death penalty could bring much-needed closure for families.

"The family of murdered officer Jayme Biendl is furious and feels betrayed. This means there is no penalty for killing their daughter. None,” Roe said in a statement referencing the corrections officer killed on the job in 2011. “What does this say to every corrections officer and the lifers they guard.”

However, King County Prosecuting Attorney Dan Satterberg, who once sought the death penalty, says he’s come to the conclusion it doesn’t work.

“I think our criminal justice system will be stronger without the death penalty,” said Satterberg. “The death penalty drags victims’ families through a process that can last literally for 20 years or more and puts the case at risk because most of the jury verdicts in Washington state for the death penalty have been reversed by courts of appeals.”

Satterberg has also raised concern about the cost of death penalty cases and the possibility of injustice.

“When you look at wrongful convictions, that’s the kind of weight that will lead to more wrongful convictions,” said Stefanie Anderson of Washington Coalition to Abolish the Death Penalty.

“When given a choice, the sort of weight of that hammer is so heavily weighted to the state, that’s the type of thing that can lead to wrongful convictions,” Anderson continued.

She called Thursday’s decision a data-driven decision that strengthens the argument for racial disparity found in the death penalty.

So far, 20 states and the District of Columbia have abolished the death penalty, while 30 states still have the law on the books.

“There’s momentum and a trajectory bigger than Washington state, but Washington state is in line with the national and international discourse about state execution," said Anderson.

Families of victims react

Not everyone agrees with Thursday's ruling. Families of victims say they won't see justice served.

Lee Paden, the mother of Geneine Harshfield, said Gregory doesn't deserve to live. She called the justices "a bunch of dummies" who cannot relate to what she has had to live with.

"He is a thoroughly evil man," said Peden.

"This is awful," Kathleen O'Bert said after the ruling. "We are not getting the justice we deserve."

WATCH: Family of victims react to death penalty ruling

O'Bert's aunt Jane Hungerford was murdered by Cecil Davis in 1996, who received a life sentence without possibility of parole, but was sentenced to death row for another killing. Davis is one of eight men who had been on death row at the State Penitentiary in Walla Walla.

However, neither O'Bert or Peden said they were surprised by the Supreme Court ruling.

"We are continuing to be victimized," said O'Bert.

The Associated Press contributed to this report.