The Supreme Court is letting an antitrust lawsuit against Apple proceed, and it’s rejected Apple’s argument that iOS App Store users aren’t really its customers. The Supreme Court upheld the Ninth Circuit Court of Appeals’ decision in Apple v. Pepper, agreeing in a 5-4 decision that Apple app buyers could sue the company for allegedly driving up prices. “Apple’s line-drawing does not make a lot of sense, other than as a way to gerrymander Apple out of this and similar lawsuits,” wrote Justice Brett Kavanaugh.

Apple had claimed that iOS users were technically buying apps from developers, while developers themselves were Apple’s App Store customers. According to an earlier legal doctrine known as Illinois Brick, “indirect purchasers” of a product don’t have the standing to file antitrust cases. But in today’s decision, the Supreme Court determined that this logic doesn’t apply to Apple.

Apple was attempting to “gerrymander” antitrust law

The court is careful to note that this is an “early stage” of the case, so there’s no ruling on whether Apple actually does have an unlawful monopoly in the App Store. But its decision could have larger ramifications for customers who want to sue any app seller for antitrust violations, and it sets the stage for a major battle between Apple and some angry customers.

Apple v. Pepper claims that by requiring iOS users to buy apps through its official App Store and charging developers a 30 percent commission, Apple is adding a mandatory fee that developers logically pass on to customers. “A claim that a monopolistic retailer (here, Apple) has used its monopoly to overcharge consumers is a classic antitrust claim. But Apple asserts that the [iOS users] in this case may not sue Apple because they supposedly were not ‘direct purchasers’” writes Kavanaugh. “We disagree. The plaintiffs purchased apps directly from Apple and therefore are direct purchasers.”

Apple says its store is ‘not a monopoly by any metric’

In the original Illinois Brick case, a court ruled that a brick manufacturer couldn’t be sued by someone who paid a separate contractor to build a structure with those bricks. But “iPhone owners are not consumers at the bottom of a vertical distribution chain who are attempting to sue manufacturers at the top of the chain.” Apple, Kavanaugh’s ruling concluded, was simply using rhetorical tricks to claim it wasn’t a direct seller — and those tricks could let other companies evade legitimate antitrust claims.

If Apple does ultimately lose this case, it could have to repay anyone who was “overcharged” thanks to its App Store markup — or even open up the iOS walled garden. Apple has made other legal arguments to fight this outcome. It’s argued, for example, that customers are free to buy apps through other app stores on other mobile operating systems. But the Supreme Court explicitly isn’t addressing these arguments yet.

Apple responded with a statement defending its App Store ecosystem. “The App Store is not a monopoly by any metric,” a spokesperson says. “We’re proud to have created the safest, most secure and trusted platform for customers and a great business opportunity for all developers around the world.”

“Today’s decision means plaintiffs can proceed with their case in District court. We’re confident we will prevail when the facts are presented and that the App Store is not a monopoly by any metric. We’re proud to have created the safest, most secure and trusted platform for customers and a great business opportunity for all developers around the world. 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 only instance where Apple shares in revenue is if the developer chooses to sell digital services through the App Store. Developers have a number of platforms to choose from to deliver their software — from other apps stores, to Smart TVs to gaming consoles — and we work hard every day to make our store the best, safest and most competitive in the world.”

Updated 3:20PM ET: Added comment from Apple.