Image copyright Getty Images

The top court in the US has ruled that states can force online companies to collect sales tax from their customers.

Previously, companies without a physical presence in a state were exempt from sales tax collection requirements.

The Supreme Court said the physical presence rule was "unsound and incorrect".

The 5-4 decision is expected to help states collect billions more in revenue each year.

The ruling stems from a dispute between three online retailers and the state of South Dakota, which passed a law in 2016 that required firms doing a certain amount of business in the state to collect sales tax from customers.

The Supreme Court rejected a challenge to that law, overturning a 1992 Supreme Court decision that established the physical presence requirement.

Justice Anthony Kennedy wrote that the rule "each year... becomes further removed from economic reality and results in significant revenue losses to the states".

He added that the requirement for physical presence amounted to a "judicially created tax shelter" that put online firms at an advantage over their bricks-and-mortar competitors.

The majority of US states collect some sales tax on retail purchases, typically charging customers between 4% and 8% for each transaction.

Shops and retail chains have argued for years that existing sales tax rules encourage customers to do their shopping online, where they can avoid paying that tax.

The National Retail Federation, a trade association, cheered Thursday's ruling, saying it would help to create a "fair and level playing field where all retailers compete under the same sales tax rules whether they sell merchandise online, in-store or both".

But NetChoice, a trade association for e-commerce firms, warned small businesses would have trouble complying with the different tax requirements in each state.

The group described the decision as a "body blow" to customers and small online businesses.

"Consumers will quickly feel the negative effects as those businesses dry up or are forced into the arms of Internet giants," said Chris Cox, NetChoice outside counsel.

Shares in the online marketplace Etsy fell more than 2% after the decision. Shares in Wayfair, an online furniture company that is one of the firms involved in the court case, fell by more than 1%.

Amazon shares slumped less than 1%. The firm already collects sales tax on the goods it sells directly, but it does not always do so for products sold by independent merchants using its platform.