WASHINGTON (AP) — The Supreme Court decided Monday that one state cannot unwillingly be sued in the courts of another, overruling a 40-year precedent and perhaps, foreshadowing an argument over the viability of other high court decisions.

The outcome left one dissenting justice wondering “which cases the court will overrule next.”

The justices divided 5-4 to end a long-running dispute between California officials and Nevada inventor Gilbert Hyatt.

Hyatt is a former California resident who sued California’s tax agency for being too zealous in seeking back taxes from him. Hyatt won a judgment in Nevada courts.

But Justice Clarence Thomas wrote for the court’s conservative justices that the Constitution forbids states from opening the doors of their courts to a private citizen’s lawsuit against another state. In 1979, the high court concluded otherwise.

The four liberal justices dissented, saying they would have left alone the court’s decision in Nevada v. Hall. Justice Stephen Breyer said there are good reasons to overrule an earlier case, including that it is no longer workable or a vestige of an otherwise abandoned legal doctrine.

But Breyer said that justices should otherwise adhere to the principle of stare decisis, Latin for to stand by things decided.

“It is far more dangerous to overrule a decision only because five members of a later court come to agree with earlier dissenters on a difficult legal question,” Breyer wrote. He included a reference to the court’s 1992 ruling in Planned Parenthood of Southeastern Pennsylvania v. Casey that reaffirmed the right to abortion the court declared in Roe v. Wade in 1973.

The future of abortion rights at the court is a matter of intense interest as several states have enacted increasingly restrictive abortion laws in the hope that a more conservative Supreme Court majority will uphold them.

In his majority opinion, Thomas cited other Supreme Court precedent that held “stare decisis is not an inexorable command.”

The Hyatt case had been to the Supreme Court twice before. In 2016, the justices split 4-4 over the same question that was finally answered on Monday.

The case is Franchise Tax Board of California v. Hyatt, 17-1299.