Juveniles can’t be sentenced to life without the possibility of parole, a split Washington Supreme Court said Thursday.

Such a sentence for someone under 18 automatically violates a provision in the state Constitution that bans cruel punishment, Justice Susan Owens wrote in the majority opinion signed by five members of the court.

Four justices disagreed, saying the majority was ignoring precedent and failing to uphold the discretion a trial court has in passing a sentence. In rare cases, including the one involved in the appeal, a court should be able to sentence a juvenile to life without parole, Justice Debra Stephens wrote in the dissent.

The ruling comes just a week after all nine members of the court ruled the state’s capital punishment law – which was only available in cases involving adult offenders – was unconstitutional.

The case that prompted the latest ruling involved Brian Bassett, who in 1996 was 16 when he was kicked out of his parents’ home and returned later with a friend to shoot his mother and father to death and drown his brother in a bathtub. At the time, life without parole was the mandatory sentence under state law.

That sentence was reviewed almost 20 years later, after the U.S. Supreme Court ruled mandatory life in prison without parole was cruel and unusual punishment under the U.S. Constitution. That ruling prompted the Washington Legislature to pass a law that requires a court to consider mitigating factors before sentencing a juvenile to life without parole. Bassett, then 35, had his sentence reviewed and sought three concurrent 25-year sentences, contending there were significant mitigating factors and that he had been rehabilitated while in prison.

The state didn’t present any evidence rebutting Bassett’s information on mitigating factors, and the sentencing judge again imposed three life sentences without parole. In his appeal, Bassett argued a life sentence without parole violated the state constitution’s guarantee against cruel punishment, and the state Court of Appeals agreed.

Owens wrote that psychologists have problems determining when a juvenile is “irreparably corrupt” and the stakes of a sentence of life without parole are extremely high. Because of that, there’s an “unacceptable risk that children undeserving of a life without parole sentence will receive one.”

Stephens agreed that a different judge may have given Bassett a different sentence when it was reviewed in 2015, but that didn’t make the decision unconstitutional. Life without parole should remain an option for some juveniles convicted of first-degree aggravated murder “in rare cases such as this,” she said.

Thursday’s ruling by the high court sends Bassett’s case back to the trial judge for resentencing in Grays Harbor Superior Court.

The ruling means Spokane County prosecutors won’t be able to seek life without parole for Caleb Sharp, the teen accused of killing a student and injuring three others at Freeman High School in September 2017.

Sharpe is jailed awaiting determination on whether he should be tried as an adult.

The ruling currently only affects two inmates in the Washington prison system, a spokesman for the Department of Corrections said. Along with Bassett, the only other inmate who was sentenced to life in prison without parole is Nga Ngoeung. He was convicted of killing two people in Spanaway in 1995.

Barry Loukaitis, who was 14 when he killed three people and wounded a fourth at a Moses Lake middle school in 1996, was resentenced in 2017 to a total of 189 years in prison.