WASHINGTON — Overruling a 40-year-old precedent, the Supreme Court said on Monday that states may not be sued in the courts of other states.

The vote was 5 to 4, with the court’s more conservative members in the majority. The ruling itself will probably not be particularly consequential, as most states already grant sovereign immunity to other states, shielding them from lawsuits. By one count, there have been only 14 cases in the past 40 years in which one state allowed another to be sued in its courts.

The decision was more important for its discussion of when precedents may be overruled. In dissent, after repeatedly citing a 1992 decision that reaffirmed the constitutional right to abortion established in 1973 in Roe v. Wade, Justice Stephen G. Breyer said he feared for the future.

“Today’s decision can only cause one to wonder which cases the court will overrule next,” he wrote.

Monday’s decision, Franchise Tax Board of California v. Hyatt, No. 17-1299, resolved a long-running dispute involving Gilbert P. Hyatt, who had made money from technology patents, and California’s tax authorities. In 1991, Mr. Hyatt, who had lived in California, told the authorities that he had moved to Nevada, which collects no personal income tax.