UPDATE 5-U.S. top court lets states force online retailers to collect sales tax

tax@

* Court upholds South Dakota law, other states could follow

* Shares of online retailers fall; Target and Walmart gain (Adds shares of brick-and-mortar retailers, Wayfair and eBay comment, analyst)

WASHINGTON, June 21 (Reuters) - States may force online retailers to collect potentially billions of dollars in sales taxes, the U.S. Supreme Court said in a major ruling on Thursday that undercut an advantage many e-commerce companies have enjoyed over brick-and-mortar rivals.

In a 5-4 ruling upholding a South Dakota law challenged by Wayfair Inc, Overstock.com Inc and Newegg Inc, the justices overturned a 1992 high court precedent that had barred states from requiring businesses with no "physical presence" there, like out-of-state online retailers, to collect sales taxes.

Shares of online retailers fell sharply following the ruling, which opened the door to a new revenue stream to fill state coffers - up to $13 billion annually, according to a federal report. Because many e-commerce companies do not collect state sales taxes on purchases, they have had an advantage over brick-and-mortar businesses that do collect it. The ruling also likely will result in many consumers paying more for online purchases.

Wayfair was down 0.7 percent and Overstock off 6.7 percent. Shares of Etsy Inc and eBay Inc, which provide platforms for small retailers to sell their wares, were off 2.4 percent and 2.7 percent, respectively.

Wayfair said it already collects sales taxes on 80 percent of its U.S. orders. "As a result, we do not expect today's decision to have any noticeable impact on our business, as it may on other retailers who do not currently collect and remit sales tax," spokeswoman Susan Frechette said.

Overstock also said the decision will have "no appreciable impact on our business."

The ruling is likely to prompt other states to try to collect sales tax on purchases from out-of-state online businesses more aggressively. Forty-five of the 50 states impose sales taxes on purchases.

The ruling comes against a backdrop of President Donald Trump's criticism of Amazon.com Inc, the leading player in online retail, on the issue of taxes and other matters. His administration backed South Dakota in the case.

Amazon, which was not involved in the Supreme Court case, collects sales taxes on direct purchases from its site but does not typically collect taxes for merchandise sold on its platform by third-party vendors, representing about half of total sales. The ruling means that states may now seek to tax more of those sales, Moody's analyst Charlie O'Shea said.

Amazon shares fell as much as 1.9 percent before paring losses. The stock was last off 0.8 percent and was among the biggest drags on the benchmark S&P 500 stock index.

Trump has bashed Amazon CEO Jeff Bezos, who also owns the Washington Post, a newspaper that the Republican president has disparaged for its coverage of him.

Shares of major retailers that have a sizeable presence online as well operating brick-and-mortar stores responded positively. Target Corp was up 1.4 percent and Walmart Inc was up 0.3 percent.

'DEFEND MAIN STREET'

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.

The South Dakota law, enacted in 2016, required out-of-state online retailers to collect sales tax if they amass $100,000 in sales or 200 separate transactions.

"This is a great day for South Dakota. We have long fought the battle to defend Main Street businesses and now with today's ruling, all businesses will compete on a level playing field," said South Dakota Republican Governor Dennis Daugaard.

"U.S. consumers are extremely savvy, and there will always be competition for the consumer. It's clear that (retailers) are going to try to incorporate increases in the prices to pass along the higher costs to the consumer," said Quincy Krosby, chief market strategist at Prudential Financial in Newark, New Jersey.

Jeffrey LeSage, Americas vice chairman at accounting firm KPMG, said the ruling "could turn out to be almost as significant for American businesses as the recent rewrite of the U.S. federal tax code."

The law could yet face legal challenges on other grounds, Justice Kennedy noted. Other states that pass similar laws are also likely to end up in court.

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

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

"You will certainly see, absent congressional action, significant litigation, as states try to push the envelope on this," said Mike Dabbs, eBay's senior director of government relations

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.

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

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 due to 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," Kennedy wrote.

(Reporting by Lawrence Hurley; Additional reporting by April Joyner; Editing by Will Dunham)