States have broad authority to force online retailers to collect potentially billions of dollars worth of sales taxes, the U.S. Supreme Court ruled on Thursday, siding against e-commerce companies in their high-profile fight with South Dakota.

The justices, in a 5-4 ruling against Wayfair Inc., Overstock.com Inc. and Newegg Inc., overturned a 1992 Supreme Court precedent that had barred states from requiring businesses with no “physical presence” in that state, like out-of-state online retailers, to collect sales taxes.

The ruling opens the door to a new revenue stream to fill state coffers – up to US$13-billion annually, according to a federal report – while imperilling a competitive advantage that e-commerce companies had over bricks-and-mortar rivals that already must collect sales tax.

Story continues below advertisement

Shares of online retailers fell sharply following the ruling, with Wayfair down 3.8 per cent, Overstock off 2.1 per cent and Etsy Inc. shares off 4.4 per cent. Amazon.com Inc. shares fell as much as 1.9 per cent before paring losses. Amazon was among the biggest drags on the benchmark S&P 500 stock index.

The court, in a ruling authored by conservative Justice Anthony Kennedy, revived a 2016 South Dakota law that required larger out-of-state e-commerce companies to collect sales tax, a mandate that the online retailers fought in court.

“Rejecting the physical presence rule is necessary to ensure that artificial competitive advantages are not created by this court’s precedents,” Justice Kennedy said.

The win was welcomed by groups representing bricks-and-mortar retailers and decried by e-commerce advocates.

The ruling puts an end to a legal regime that “distorts free markets and puts local brick-and-mortar stores at a competitive disadvantage with their online-only counterparts,” said Deborah White, general counsel of the Retail Industry Leaders’ Association.

Small online businesses will be the hardest hit, said Chris Cox, a lawyer for e-commerce industry group NetChoice.

“Consumers will quickly feel the negative effects as those businesses dry up or are forced into the arms of Internet giants,” he added.

Story continues below advertisement

South Dakota was backed by U.S. President Donald Trump’s administration in the case. The law could yet face legal challenges on other grounds, Justice Kennedy noted.

The ruling is likely to lead other states to try to collect sales tax on purchases from out-of-state online businesses more aggressively. It also likely will lead to many consumers paying more at the online checkout. Forty-five of the 50 states impose sales taxes.

Most states would need to pass legislation before seeking to collect the additional taxes, although some have already enacted laws or regulations similar to South Dakota’s.

South Dakota has estimated that it could take in up to US$50-million a year in additional revenue with these taxes being collected.

States such as South Dakota that depend heavily on sales taxes for their revenue are likely to benefit most, with a predicted maximum revenue increase of around 3 per cent, according to a Barclays research note.

The states that are likely to see the biggest percentage increase in revenue are Louisiana, Tennessee, South Dakota, Oklahoma and Alabama, according to the Barclays research.

Story continues below advertisement

Justice Kennedy wrote that the 1992 precedent that affirmed that a physical presence is required – a case called Quill v. North Dakota – was “flawed on its own terms” and was especially problematic since the rise of internet retail.

In the digital era, the costs of complying with different tax regimes “are largely unrelated to whether a company happens to have a physical presence in a state,” Justice Kennedy wrote.

The ruling comes against a backdrop of Mr. Trump’s criticism of Amazon, the leading player in online retail, on the issue of taxes and other matters.

Amazon, which was not involved in the Supreme Court case, collects sales taxes on direct purchases on its site but does not typically collect taxes for merchandise sold on its platform by third-party vendors, representing about half of total sales.