(CNN Money) -- The Supreme Court ruled Thursday that states can compel retailers to collect sales taxes even if they don't have a physical presence in the state.

The 5-4 decision overturns a 1992 Supreme Court precedent that effectively barred states from collecting such taxes, and could leave consumers paying more for online purchases as cash-strapped states tap a rich vein of new revenue.

In making their decision, justices ruled that South Dakota can collect sales taxes from online retailers like Wayfair, which brought the suit. In doing so, the court reversed a 1992 ruling that allowed states to levy taxes only on those businesses with a brick-and-mortar location within the state. The court said that law effectively incentivized businesses to "avoid physical presence" in states and led to "a judicially created tax shelter" Ultimately, the justices said the current laws are outdated.

"The Internet's prevalence and power have changed the dynamics of the national economy," Justice Anthony Kennedy wrote in the majority opinion. "The expansion of e-commerce has also increased the revenue shortfall faced by States seeking to collect their sales and use taxes."

South Dakota's law applies only to those businesses with more than $100,000 in sales in a state.

Sucharita Kodali, a retail analyst with Forrester, called the ruling "bad news" for thousands of major online retailers. "Now those companies have to assess taxes on customers or they get sued. For products like furniture, jewelry, electronics, people will likely start to shop local again," she said.

Shares of Amazon, Wayfair, Etsy and eBay dipped in early trading immediately after the ruling.

State and local governments had grown increasingly agitated as sales from brick and mortar retailers gave way to online retail, which now comprises approximately 9.5% of the dollar value of total purchases.

Prohibitions against collecting sales taxes from online retailers cost states as much as $13.4 billion last year, according to the General Accountability Office. Although the IRS requires consumers to tally their purchases and pay all applicable taxes with their regular filing, few people do.

Many large online retailers, including Amazon and Wal-Mart, already collect sales taxes because they have a large enough physical presence in each state to qualify as taxable by states. But plenty of smaller players, such as home furnishings websites Overstock.com and Wayfair, don't have widespread enough operations to be subject to state taxing authority, giving them a substantial price advantage over traditional brick and mortar businesses.