Minnesota's biggest retailers heralded the U.S. Supreme Court's decision on Thursday to clear the way for states to require companies such as Amazon and Wayfair to collect sales tax.

Brick-and-mortar businesses, including Target Corp. and Best Buy Co. Inc., have long complained that they are disadvantaged by having to charge sales taxes while many of their online competitors do not. States have said that they are missing out on tens of billions of dollars in annual revenue under a 1992 Supreme Court ruling that helped spur the rise of internet shopping.

On Thursday, the court voted 5-4 to overrule its decision on Quill Corp. v. North Dakota, which had said that the Constitution bars states from requiring businesses to collect sales taxes unless they have a substantial connection to the state.

"Target has long advocated for sales tax policies that level the playing field and treat all retailers the same, whether they have stores, operate online or both," the Minneapolis-based retailer said in a statement.

Richfield-based Best Buy officials said the decision "finally brings sales tax collection into the internet age, and reinforces the basic American notions of fairness and a level playing field for all who choose to compete in the marketplace."

Minnesota taxpayers also stand to benefit. Government reports estimate that roughly 80 percent of taxes are collected under the current system, which costs states a collective $8.5 billion to $13.4 billion a year. Minnesota loses between $132 million and $206 million annually, according to a 2017 report by the Government Accountability Office.

The ruling paves the way for states to require online sellers to collect tax if they earn $100,000 in online sales or perform more than 200 transactions a year.

The Minnesota Department of Revenue said it is pleased with Supreme Court decision but will need to identify how it affects the states' online retailers, remote sellers and marketplace providers.

The agency said it planned to provide further guidance within 30 days and will work to provide Minnesotans with information and services they'll need to meet their sales and tax obligations.

However, some smaller online retailers are worried about the impact on their businesses.

"As a small retailer, I don't want to be saddled with having to file taxes in a lot of different states," said Anne Kelly, whose company sells women's plus-size active wear at JunoActive.com. "That's potentially going to be a big burden."

Because she has a warehouse, inventory and employees in Minnesota, she already pays taxes here. Sorting out which taxes to pay in which state will force software providers to "step up their game."

Her company launched via catalog in 1995 and added internet sales in 1999, so has seen major shifts in the retail marketplace.

"This is not a new issue," Kelly said. "I don't have any philosophical opposition to collecting taxes fairly. My only concern is how to execute so that it has minimal operational burden on small businesses."

Brian Stromen, a Minneapolis-based tax partner at the audit, tax and advisory firm KPMG, said the ruling could be every bit as far-reaching as recent changes to the federal tax code.

For now, there's a lot of uncertainty.

"Not as many people were as surprised over the decision as they are concerned now with what kind of time they'll be given to do this," Stromen said. The retailers will have to buy software, do tax analysis and more, so allowing them time to upgrade their systems is key.

Writing for the majority, Supreme Court Justice Anthony Kennedy said the Quill decision had distorted the nation's economy and had caused states to lose annual tax revenue between $8 billion and $33 billion.

"Quill puts both local businesses and many interstate businesses with physical presence at a competitive disadvantage relative to remote sellers," he wrote. "Remote sellers can avoid the regulatory burdens of tax collection and can offer de facto lower prices caused by the widespread failure of consumers to pay the tax on their own."

Justices Clarence Thomas, Ruth Bader Ginsburg, Samuel Alito and Neil Gorsuch joined the majority opinion.

In dissent, Chief Justice John Roberts agreed that the court's rulings in this area had been "wrongly decided." But he said there were insufficient reasons to overrule the precedents and that Congress should have been left to address the matter.

"E-commerce has grown into a significant and vibrant part of our national economy against the backdrop of established rules, including the physical-presence rule," the chief justice wrote. "Any alteration to those rules with the potential to disrupt the development of such a critical segment of the economy should be undertaken by Congress."

Justices Stephen Breyer, Sonia Sotomayor and Elena Kagan joined the dissent.

After Kennedy and some justices had said it might be time to reconsider the case, South Dakota enacted a law that required all merchants to collect a 4.5 percent sales tax if they had $100,000 in annual sales or more than 200 individual transactions in the state. State officials sued three large online retailers — Wayfair, Overstock.com and Newegg — for violating the law.

Kennedy in his decision singled out Wayfair, an online retailer of home goods and furniture.

"Its advertising seeks to create an image of beautiful, peaceful homes, but it also says that 'one of the best things about buying through Wayfair is that we do not have to charge sales tax,' " he wrote. "What Wayfair ignores in its subtle offer to assist in tax evasion is that creating a dream home assumes solvent state and local governments."

The Retail Industry Leaders Association and its sister organization, Retail Litigation Center, have worked for several years to build a case to support the South Dakota law.

"This was the right case and the right time for the court to act, and we couldn't be more pleased with the outcome," said Deborah White, general counsel for the organizations.

Although online retailers' stock recovered some throughout the day, the Supreme Court's decision sent Wayfair, Etsy and eBay's stock down.

Amazon said it already collects taxes on all of its own goods on the website. Wayfair said it collects taxes on over 80 percent of its sales.

"We welcome the additional clarity provided by the court's decision," the company said. "We do not expect [Thursday'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."

The New York Times contributed to this report Jackie Crosby • 612-673-7335