– The Supreme Court took up a huge sales tax case on Tuesday with the expectation that it was ready to bring online shopping under the same rules that apply to ordinary retailers.

But that outcome was less certain after Tuesday’s argument. The justices were clearly divided, but in unusual coalitions of conservatives and liberals. One side said Congress, not the courts, should set the rules for taxing interstate commerce.

At issue is a 1992 ruling involving mail-order catalogs when the justices found that states may not require out-of-state mailers to collect sales taxes on behalf of their residents. Now, in the era of online shopping, that decision in Quill v. North Dakota is said to cost states and municipalities $8 billion to $13 billion a year in lost tax revenue.

Chief Justice John Roberts and Justices Samuel Alito and Elena Kagan said Congress is better suited to devise a new system. Roberts worried that requiring people who run their own websites to collect sales taxes for an estimated 12,000 taxing jurisdictions across the nation would be overly burdensome. There needs to be a minimum threshold, he said.

Kagan added, “Congress can craft a compromise in a way that we cannot.”

Justice Sonia Sotomayor said she is worried that “overturning precedents will create a massive amount of lawsuits.”

But Justice Ruth Bader Ginsburg said it should not be left to Congress to grapple with the court’s previous decision. “If time and changing conditions have rendered [the Quill decision] obsolete, why should the court say: Well, we’ll let Congress fix it?”

Justice Anthony Kennedy agreed that the Quill ruling was “incorrect” and should be overruled. And Justice Neil Gorsuch said it was unfair to traditional retailers who must collect sales taxes. “Why should this court favor a particular business model?” he asked.

Justice Stephen Breyer, who could hold the deciding vote, asked questions about the costs and burdens of collecting sales taxes.

The case, South Dakota v. Wayfair, began when the state passed a law requiring retailers who do more than $100,000 worth of business there to collect its 4.5 percent sales tax, even if they were located in other states. The law was struck down as unconstitutional based on the Quill decision. But the high court then voted to hear the state’s argument that the Quill decision should be overruled.

For online shoppers across the U.S., the court’s decision could mean higher prices, although many large internet sellers, including Amazon, have already been collecting sales taxes in recent years. Defenders say small merchants would face an unfair burden.

Traditional brick-and-mortar retailers believe the case is about fairness. They have had to collect taxes on their sales, while shoppers knew they could often pay less for the same products online.

State and local governments see online sales as a source of needed revenue. Last year, the Government Accountability Office estimated that these governments were losing $13 billion a year in uncollected sales taxes. A group called the Marketplace Fairness Coalition said the loss could be as much as $33 billion a year.

In 1992, the justices ruled the Constitution bars a state from requiring a catalog seller in, say, Maine from collecting the sales taxes owed by a shopper in California. It was based in part on the notion that if the catalog company had no “physical presence” in California, it did not use the state’s resources, and had no obligation to support it. But South Dakota and 41 other states argue that the rule is outdated.