The Supreme Court’s conservative majority overturned a 40-year-old precedent Monday, prompting a pointed warning from liberal justices about “which cases the court will overrule next.”

The issue in Monday’s 5-to-4 ruling was one of limited impact: whether states have sovereign immunity from private lawsuits in the courts of other states. In 1979, the Supreme Court ruled that there is no constitutional right to such immunity, although states are free to extend it to one another and often do.

But the court’s conservative majority overruled that decision, saying there was an implied right in the Constitution that means states “could not be haled involuntarily before each other’s courts,” in the words of Justice Clarence Thomas, who wrote Monday’s decision.

Thomas acknowledged the departure from the legal doctrine of stare decisis, in which courts are to abide by settled law without a compelling reason to overrule the decision.

But he said the court’s decision four decades ago in Nevada v. Hall “is contrary to our constitutional design and the understanding of sovereign immunity shared by the States that ratified the Constitution. Stare decisis does not compel continued adherence to this erroneous precedent.”

As was evident during the confirmation hearings of President Trump’s nominees to the Supreme Court — Justices Neil M. Gorsuch and Brett M. Kavanaugh — liberals are worried about what other court precedents the newly fortified conservative majority will find wrongly decided.

Justice Stephen G. Breyer had other issues — abortion rights, for instance, or affirmative action — in mind in his dissent.

It is “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, adding: “Today’s decision can only cause one to wonder which cases the Court will overrule next.”

Gorsuch and Kavanaugh joined Thomas in the majority, along with Chief Justice John G. Roberts Jr. and Justice Samuel A. Alito Jr.

Breyer wrote for liberal justices Ruth Bader Ginsburg, Sonia Sotomayor and Elena Kagan.

Adhering to precedent dominated the oral arguments in the case in January. Two of the court’s most experienced practitioners recounted the founding of the union and the framing of the Constitution, and both claimed that the notion of state sovereignty was on their side.

Thomas sided with the view that “the States’ sovereign immunity is a historically rooted principle embedded in the text and structure of the Constitution.”

He conceded that it was not explicitly set out in the text of the document. However, “there are many other constitutional doctrines that are not spelled out in the Constitution but are nevertheless implicit in its structure and supported by historical practice,” he wrote.

But Breyer countered that the arguments on the other side are just as compelling, and that there was no reason to junk a precedent that has hardly proved unworkable. There have been only 14 cases of states being involuntarily called into another state’s courts, he said.

Stare decisis requires us to follow Hall, not overrule it,” Breyer wrote, mentioning one of the court’s decisions upholding abortion rights as an example. “What could the justification be in this case? The majority doesn’t find one.”

In reality, both conservatives and liberals find justification for overturning precedent when they see a compelling need. But lately, liberal justices have been especially protective of precedent, fearing the court’s conservative majority.

The case at hand was at the Supreme Court for the third time. California’s Franchise Tax Board accused Gilbert P. Hyatt of basically faking his move from the Golden State to Nevada in the early 1990s to avoid paying income tax.

But the way investigators went about their work — looking through his garbage and interrogating family members and business associates — prompted Hyatt to sue the auditors in Nevada court. He won and was awarded nearly $500 million, a figure that has been reduced through years of litigation to $100,000.

The California tax board contends that it never should have been called into Nevada court. When an earlier iteration of the case was heard two years ago, the Supreme Court split 4-to-4 on whether the 1979 decision allowing such suits was correct. At the time, the court had only eight members because of the death of Justice Antonin Scalia.

The case is Franchise Tax Board of California v. Hyatt.