Online shoppers could find costs going up after the Supreme Court did away Thursday with a decades-old precedent limiting the ability of states to collect sales tax on certain out-of-state Internet purchases.

The 5-4 ruling called the current rules “unsound and incorrect.”

Currently, businesses shipping a product to another state where it does not have a "physical presence" -- a store, office or warehouse -- are not forced to collect that state's sales tax.

In giving a victory to the states, the high court said that rule is outdated.

“When the day-to-day functions of marketing and distribution in the modern economy are considered, it is all the more evident that the physical presence rule is artificial in its entirety,” Justice Anthony Kennedy wrote.

The current regulation “allows remote sellers to escape an obligation to remit a lawful state tax is unfair and unjust,” added Kennedy. “It is unfair and unjust to those competitors, both local and out of state, who must remit the tax; to the consumers who pay the tax; and to the states that seek fair enforcement of the sales tax.”

A coalition of small business owners, many offering their online goods from home offices, say their profits would evaporate if forced to comply with complex tax rules in all 50 states.

Yet a majority of the states say they are losing billions in revenue, and they are supported by many large, so-called brick-and-mortar retailers like Wal-Mart that do pay sales tax, regardless of whether their sales are done in stores or online.

E-commerce now makes up about 10 percent of U.S. retail sales, according to the Commerce Department.

South Dakota is leading the legal charge, passing a law requiring the collection of sales tax on Internet vendors with at least 200 yearly transactions or $100,000 in sales to its residents.

Forty-one states back the effort, saying the problem is growing worse as e-commerce continues to grow nationwide. They argue tax-collection software makes it easier for retailers big and small to comply with their tax obligations, which vary widely from state to state, and product to product.

But many online sellers, such as Etsy or EBay, that serve as a third party portal for thousands of small homegrown businesses that do not pay sales taxes, point to confusing tax rules that could expose them to costly audits for any revenue shortfall.

As an example, lawyers for the online retailers told the high court that in Illinois, a Snickers bar costs more in taxes than a Twix bar, since food items containing flour are not treated as candy for tax purposes. Customers in most cases are supposed to pay the tax themselves, but both sides of the debate admit few actually do.

And several justices, in an intense hour of oral arguments on Tuesday, expressed concern about overturning the precedent, despite the fact it was decided before the digital age.

Some on the bench said Congress' refusal over the years to act on its own was a sign the status quo should be preserved.

Amazon, by far the nation's largest online seller, is not a party to the case, since it now has a physical presence in many states, with warehouses, and pays the taxes.

The high court has said for more than 50 years in various rulings that states cannot collect taxes from sellers without a "physical presence" in those states. That precedent was preserved in a key 1992 ruling.

Congress two decades ago exempted most online sellers. But as the e-commerce platform has evolved, more of the larger online retailers have begun paying sales taxes -- about 90 percent of the revenue owed.