FILE - In this Oct. 10, 2017, file photo, the Supreme Court in Washington is seen at sunset. States will be able to force shoppers to pay sales tax when they make online purchases under a Supreme Court decision June 21, 2018, that will leave shoppers with lighter wallets but is a big win for states. (AP Photo/J. Scott Applewhite, File)

FILE - In this Oct. 10, 2017, file photo, the Supreme Court in Washington is seen at sunset. States will be able to force shoppers to pay sales tax when they make online purchases under a Supreme Court decision June 21, 2018, that will leave shoppers with lighter wallets but is a big win for states. (AP Photo/J. Scott Applewhite, File)

WASHINGTON (AP) — States will be able to force more people to pay sales tax when they make online purchases under a Supreme Court decision Thursday that will leave shoppers with lighter wallets but is a big financial win for states.

Consumers can expect to see sales tax charged on more online purchases — likely over the next year and potentially before the Christmas shopping season — as states and retailers react to the court’s decision, said one attorney involved in the case.

ADVERTISEMENT

The Supreme Court’s 5-4 opinion Thursday overruled a pair of decades-old decisions that states said cost them billions of dollars in lost revenue annually. The decisions made it more difficult for states to collect sales tax on certain online purchases, and more than 40 states had asked the high court for action. Five states don’t charge sales tax.

The cases the court overturned said that if a business was shipping a customer’s purchase to a state where the business didn’t have a physical presence such as a warehouse or office, the business didn’t have to collect sales tax for the state. Customers were generally responsible for paying the sales tax to the state themselves if they weren’t charged it, but most didn’t realize they owed it and few paid.

Justice Anthony Kennedy wrote that the previous decisions were flawed.

“Each year the physical presence rule becomes further removed from economic reality and results in significant revenue losses to the States,” he wrote in an opinion joined by Justices Clarence Thomas, Ruth Bader Ginsburg, Samuel Alito and Neil Gorsuch. Kennedy wrote that the rule “limited States’ ability to seek long-term prosperity and has prevented market participants from competing on an even playing field.”

The ruling is a victory for big chains with a presence in many states, since they usually collect sales tax on online purchases already. Now, rivals will be charging sales tax where they hadn’t before.

Big chains have been collecting sales tax nationwide because they typically have physical stores in whatever state a purchase is being shipped to. Amazon.com, with its network of warehouses, also collects sales tax in every state that charges it, though third-party sellers who use the site don’t have to.

Until now, many sellers that have a physical presence in only a single state or a few states have been able to avoid charging sales taxes when they ship to addresses outside those states. Online sellers that haven’t been charging sales tax on goods shipped to every state range from jewelry website Blue Nile to pet products site Chewy.com to clothing retailer L.L. Bean.

ADVERTISEMENT

Sellers that use eBay and Etsy, which provide platforms for smaller sellers, also haven’t been collecting sales tax nationwide.

Under the ruling Thursday, states can pass laws requiring out-of-state sellers to collect the state’s sales tax from customers and send it to the state. More than a dozen states have already adopted laws like that ahead of the court’s decision, according to state tax policy expert Joseph Crosby.

Retail trade groups praised the ruling, saying it levels the playing field for local and online businesses. The losers, said retail analyst Neil Saunders, are online-only retailers, especially smaller ones. Those retailers may face headaches complying with various state sales tax laws, though there are software options to help. That software, too, can be an added cost. The Small Business & Entrepreneurship Council advocacy group said in a statement, “Small businesses and internet entrepreneurs are not well served at all by this decision.”

Chief Justice John Roberts and three of his colleagues would have kept the court’s previous decisions in place.

“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. 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,” Roberts wrote in a dissent joined by Justices Stephen Breyer, Elena Kagan and Sonia Sotomayor. The lineup of justices on each side of the case was unusual, with Roberts joining three more liberal justices and Ginsburg joining her more conservative colleagues.

The case the court ruled on involved a 2016 law passed by South Dakota, which said it was losing out on an estimated $50 million a year in sales tax not collected by out-of-state sellers. Lawmakers in the state, which has no income tax, passed a law designed to directly challenge the physical presence rule. The law requires out-of-state sellers who do more than $100,000 of business in the state or more than 200 transactions annually with state residents to collect sales tax and send it to the state.

South Dakota wanted out-of-state retailers to begin collecting the tax and sued several of them: Overstock.com, electronics retailer Newegg and home goods company Wayfair. After the Supreme Court’s decision was announced, shares in Wayfair and Overstock both fell. Shares in large chains with more stores traded higher.

South Dakota Gov. Dennis Daugaard called Thursday’s decision a “Great Day for South Dakota,” though the high court stopped short of greenlighting the state’s law. While the Supreme Court spoke approvingly of the law, it sent it back to South Dakota’s highest court to be revisited in light of the court’s decision.

The Trump administration had urged the justices to side with South Dakota. On Twitter, President Donald Trump called the decision a “Big victory for fairness and for our country.” He also called it a “Great victory for consumers and retailers,” though consumers will ultimately be paying more and businesses weren’t uniformly cheering the decision.

The case is South Dakota v. Wayfair, 17-494.

___

Associated Press reporter Zeke Miller contributed to this report.

___

Follow Jessica Gresko on Twitter at http://twitter.com/jessicagresko