The court chose to overturn a 1992 decision that a physical presence was necessary to require retailers to collect and send sales taxes to a state.

A divided Supreme Court ruled Thursday that states may require online retailers to collect billions of dollars of sales tax revenue owed to them. North Dakota that restricts states from collecting sales tax from retailers without a physical presence in those states.

Justice Anthony Kennedy wrote that the previous decisions were flawed.

The current regulation "allows remote sellers to escape an obligation to remit a lawful state tax is unfair and unjust", added Kennedy.

The Supreme Court rules against Wayfair and other online retailers and overturns ban on the collection of online sales taxes. Estimates of how much money the states are losing vary dramatically, ranging from more than $200 billion over five years to a recent estimate from the Government Accountability Office of between $8 billion and $13 billion per year.

E-commerce now makes up about 10 percent of US retail sales, according to the Commerce Department. (It dealt primarily with catalog sales.) The state, which argued it lost $50 million a year in sales tax, was supported by independent retailers such as bookstores that are forced to compete with online companies but whose products end up being more expensive because they must charge sales taxes.

Forty-one states back the effort, saying the problem is growing worse as e-commerce continues to grow nationwide.

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.

As an example, lawyers for the online retailers told the high court that in IL, 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 were generally supposed to pay the tax to the state themselves if they were not charged by the merchant, but the vast majority of consumers did not.

Even so, during oral arguments, several justices had seemed lukewarm on the idea of overturning the old precedent. That precedent was preserved in a key 1992 ruling.

The high court has said for more than 50 years in various rulings that states can not collect taxes from sellers without a "physical presence" in those states.