The Supreme Court’s ruling in the case of South Dakota v. Wayfair allowing states to collect sales tax from out-of-state online retailers will benefit long-term state credit quality, even if the effect is muted in the near-term, S&P Global Ratings said. The decision “will help stem state tax erosion in a changing economic environment,” S&P said. The ratings agency highlights 2017 e-commerce sales growth of 15.9% while retail sales outside of e-commerce grew 3.4%. “We expect most states that impose retail sales tax to enact new legislation that require at least large out-of-state online retailers to collect sales tax at time of sale,” S&P wrote. Wayfair Inc. and Amazon.com Inc. both collect sales tax on a majority of sales. Brick-and-mortar retailers have struggled to beef up their online channels and drive traffic to stores as shopping shifts to e-commerce. Tom McGee, chief executive of the International Council of Shopping Centers, which has been advocating for the change, told MarketWatch the ruling will “ensure that people compete on equal footing.” Amazon shares are down 1.2% in Thursday trading, Wayfair shares are down 1.4% and shares of the Amplify Online Retail ETF are down 1.4%. Shares of a variety of traditional retailers, including Gap Inc. (up 2%), American Eagle Outfitters Inc. (up 2.4%) and Nordstrom Inc. (up nearly 2%) all rose in the day’s trading. The SPDR S&P Retail ETF is up 0.3% for the day while the S&P 500 index is up 0.8% for the period.