(Bloomberg) -- Apple Inc. shares sank on Friday, swiftly dropping to a session low after a federal judge ordered the company to change the way it operates its App Store, which would hurt the profitability of that business unit.

The stock fell as much as 3.5% in its biggest intraday loss since May 4, with the decline erasing nearly $85 billion off the iPhone maker’s market capitalization. The size of the loss is bigger than all but 98 components of the S&P 500 Index.

A federal judge granted an injunction sought by Epic Games Inc. which would allow developers to steer consumers outside payment methods for mobile apps. It also ordered the game maker to pay damages to Apple for breach of contract.

With the day’s slump, Apple is on track for a weekly decline of about 3%, which would be its biggest drop since February. The stock remains up nearly 13% so far this year.

The S&P 500 Index fell 0.2% on Friday. As the largest component of the benchmark index, with a market value above $2.4 trillion, Apple accounted for about two-thirds of the benchmark’s decline.

©2021 Bloomberg L.P.