WASHINGTON (Reuters) - A divided U.S. Supreme Court on Monday gave the go-ahead to an antitrust lawsuit accusing Apple Inc of forcing consumers to overpay for iPhone software applications, a decision that could lead to billions of dollars in damages and put at risk the company’s lucrative way of selling apps.

In a 5-4 ruling, the justices upheld a lower court’s decision to allow the proposed class action lawsuit to proceed. The consumer plaintiffs claim Apple monopolized the market in violation of federal antitrust law by requiring that apps be sold through its App Store and extracting an excessive 30 percent commission on purchases.

Apple’s shares fell 5.8% to $185.72. The ruling came on a day when Apple shares already were trading lower because of concerns over a full-blown U.S.-China trade war.

The Cupertino, California-based technology company, backed by U.S. President Donald Trump’s administration in the case, argued that it was only acting as an agent for app developers, who set their own prices and pay Apple’s commission.

Monday’s ruling, written by Justice Brett Kavanaugh, did not resolve the merits of the claim against Apple. But if the plaintiffs win at trial, Mark Rifkin, a lawyer representing them, said that “the overcharges paid by consumers since Apple’s monopoly began will be measured in the billions of dollars.”

In a statement, Apple said, “We’re confident we will prevail when the facts are presented and that the App Store is not a monopoly by any metric.”

The dispute hinged in part on how the justices would apply a 1977 Supreme Court precedent. In that case, the court limited damages for anti-competitive conduct to those directly overcharged rather than indirect victims who paid an overcharge passed on by others.

Kavanaugh explained from the bench that the 1977 precedent was “not a get-out-of-court-free card for monopolistic retailers,” an apparent allusion to the popular board game Monopoly.

“Apple’s theory would provide a roadmap for monopolistic retailers to structure transactions with manufacturers or suppliers so as to evade antitrust claims by consumers and thereby thwart effective antitrust enforcement,” Kavanaugh wrote in the ruling.

FILE PHOTO: Customers walk past an Apple logo inside of an Apple store at Grand Central Station in New York, U.S., August 1, 2018. REUTERS/Lucas Jackson/File Photo

Apple has said the consumers were indirect purchasers, at best, because any overcharge would be passed on to them by developers. The iPhone users who sued countered that they pay Apple - not an app developer - whenever buying an app from the App Store, and were therefore direct victims of the overcharges.

Siding with the consumers, Kavanaugh, a conservative appointed by Trump, joined the court’s four liberal justices to rule against Apple.

Dissenting from the decision, conservative Justice Neil Gorsuch, said the decision is “not how antitrust law is supposed to work” because it gives a green light to the exact type of case that the court had previously prohibited. Gorsuch also was appointed by Trump.

SERVICES BUSINESS

Apple had avoided much of the antitrust scrutiny faced by other technology firms including Facebook, largely by arguing that it does not have a dominant position in the many markets in which it operates, from smart phones and laptops to streaming music services. The lawsuit, along with complaints over App Store policies to European officials from rivals such as streaming music Spotify, could draw Apple into the broader public debate over the market power of large tech companies.

The legal setback for Apple comes as investors are looking to the company’s services business, including its App Store, to fuel growth as iPhone sales slow.

Rifkin said he was gratified by the court’s decision, which “reaffirmed the straightforward principle that consumers who purchase a monopolized product directly from the alleged monopolist may sue the monopolist to recover the full amount of the overcharge they are forced to pay by reason of the monopoly.”

Apple said in its statement, “Developers set the price they want to charge for their app and Apple has no role in that. The vast majority of apps on the App Store are free and Apple gets nothing from them.”

The ruling could lead to other lawsuits against tech companies that act as platforms for other products or services. Apple had warned that this could pose a threat to e-commerce, a rapidly expanding segment of the U.S. economy worth hundreds of billions of dollars in annual sales.

The plaintiffs, including lead plaintiff Robert Pepper of Chicago, filed the suit in a California federal court in 2011, claiming Apple’s monopoly leads to inflated prices compared to if apps were available from other sources. They were supported by 30 state attorneys general, including from Texas, California and New York.

Apple, also backed by the U.S. Chamber of Commerce business group, had sought to dismiss the case, arguing the plaintiffs lacked the required legal standing to sue.

After a federal judge in Oakland threw out the suit, the San Francisco-based 9th U.S. Circuit Court of Appeals revived it in 2017, finding that Apple was a distributor that sold iPhone apps directly to consumers.