The Supreme Court on Monday wrestled with whether to allow a 40-year-old legal doctrine to derail a class-action lawsuit arguing that Apple uses its monopoly control over the iPhone app market to overcharge customers for apps.

Apple takes a 30 percent cut for every iPhone app sold. Some customers sued in 2011, arguing that Apple is abusing its monopoly by overcharging customers.

But Apple is trying to shut the lawsuit down by arguing that consumers shouldn't be allowed to sue at all. The company has seized on a 1977 Supreme Court ruling that held that only a company's direct customers can sue for antitrust violations. In Apple's view, customers buy apps from developers, who turn around and pay Apple a 30 percent cut. That means that only the developers—not ordinary iPhone users—have standing to sue Apple.

But in Monday's oral argument, justices quickly pointed out an obvious problem with that argument. "The first sale is from Apple to the customer," said Justice Sonia Sotomayor. "It's the customer who pays the 30 percent."

But Apple's lawyer stuck to his guns. Technically, it's true that Apple charges customers directly for their app purchases. But the price of the apps is set by the developers. And in Apple's view, that means that the transaction is really a sale from the developer to the customer. Apple portrays itself as a supplier of services to the app developer—in much the same way that a mall owner rents out space to individual retailers.

It's a confusing and counterintuitive argument. The Ninth Circuit Court of Appeals rejected the argument last year, holding that customers were buying apps directly from Apple, and therefore customers could sue Apple for potential antitrust violations.

But the argument may be the best option the iPhone maker has to ward off an awkward and potentially expensive legal battle over Apple's App Store policies. Apple works hard to prevent customers from purchasing apps outside of Apple's App Store. Customers want to prove that those practices violate antitrust law. But first they have to convince the Supreme Court that they have the right to bring the lawsuit in the first place.

A fight over a concrete cartel set a key antitrust precedent

In the 1970s, the state of Illinois sued a group of concrete block makers accused of colluding to raise the price of concrete blocks—and therefore the cost of state construction projects. But the state lost the lawsuit because the Supreme Court held that only the companies' direct customers—masonry contractors who did the actual construction work—could sue the concrete block makers for overcharging.

Concrete block suppliers would sell blocks to masonry contractors, who would in turn be hired by general contractors working on state construction projects. The Supreme Court worried that it would be too difficult to untangle exactly how monopolistic prices at one level of the supply chain would get passed along to other companies further down the chain. So it required price-fixing lawsuits to be brought only by direct customers—in this case, contractors who were directly buying blocks from the colluding concrete companies.

This case has been an important precedent in antitrust law for the last 40 years. And Apple's lawyers realized it could be a way to get rid of lawsuits from customers accusing Apple of engaging in monopolistic practices itself.

Apple argues that it is a supplier to app developers just as concrete block companies are suppliers to masonry contractors. As Apple attorney Daniel Wall explained on Monday, developers are "buying a package of services that include distribution and software intellectual property and testing and so forth" from Apple. App developers then turn around and use these services to help them sell their apps—just as a masonry contractor uses concrete blocks to build buildings for a client.

Hence, if Apple is overcharging for its app store services, Apple says, the law only allows developers to sue—just as only masonry contractors can sue the companies that supplied them with their concrete.

But several justices seemed to think that this was a stretch. A concrete block company might have had no direct dealings with the ultimate customer of a construction project. But Apple obviously does have a direct relationship with customers.

"It seems to me that when you're looking at the relationship between the consumer and Apple, that there is only one step," added Justice Elena Kagan.

"Apple took 30 percent from the customer, not from the developer," Justice Sotomayor pointed out.

But Wall, the attorney for Apple, pointed to the fact that app developers, not Apple, decide the prices of apps in the app store. And so even though Apple is technically the one that charges people's credit cards, it makes more sense to regard app store purchases as transactions between the customer and the app developer—with Apple supplying distribution services to the developer.

Will justices buy this argument? They didn't seem very persuaded in Monday's arguments. But the questions justices ask in oral argument don't necessarily decide the matter. Sometimes tough questions indicate which way a justice is leaning. But in other cases, justices ask tough questions just to double-check that the side they're leaning toward stands up to careful scrutiny.

One hopeful sign for Apple: the most skeptical questions tended to come from the court's liberals. Justices Elena Kagan, Sonia Sotomayor, and Stephen Breyer all seemed to think the simple fact that Apple directly charges customers might be enough to decide against Apple. On the other hand, conservative justice Neil Gorsuch seemed more open to Apple's argument, and the other conservative justices didn't tip their hands as much. So Apple's best hope may be that the case breaks down along partisan lines, with the court's four liberals siding with the plaintiffs and the five conservatives siding with Apple.

The case could raise awkward questions about Apple’s business practices

It's important to emphasize here that Monday's oral arguments weren't about the larger question of whether Apple has abused its app store monopoly. This week's oral argument is strictly about whether customers are allowed to pursue the lawsuit at all. If the high court allows the case to move forward, then lower courts will grapple with the substance of the antitrust dispute.

Knocking the case out of court at this early stage would be convenient for Apple because the case could raise some difficult questions about Apple's business practices. While the arguments didn't focus on these issues, plaintiffs' attorney David Frederick offered a preview during Monday's arguments.

"Apple cannot point to another e-commerce distributor that does what it does," he said. "In every other instance, there is an alternative to buying the product."

What he means is that most other platforms offer mechanisms for power users to bypass the official app store and install apps directly on their devices. That includes Apple's main smartphone competitor, Google's Android.

For example, Epic Games recently announced it would bypass the Google Play Store for the Android version of Fortnite. Instead, users will need to go to Epic's website, enable a potentially dangerous "sideloading" permission, and directly download the app file. Few app makers go this route, even on Android where it's technically allowed. But this possibility helps to discourage Google from abusing its dominant position in the Android app ecosystem.

Google also allows third parties to run their own app stores. Some Android device makers ship their own app stores with their phones, and Amazon offers an Android app store.

By contrast, Apple has worked hard to prevent the independent distribution of iPhone apps. There are a few possible workarounds, like jailbreaking your phone or using Apple's development tools . But Apple has made it extremely difficult for legitimate developers to distribute apps to iPhone users without going through the official App Store. (Interestingly, despite this extra competition, Google still charges the same 30 percent commission for app sales as Apple does.)

Apple insists that this is necessary to protect customers from malware—and it's not a crazy argument. But plaintiffs argue that it's an illegal scheme to enrich Apple by preventing ordinary market competition. If the lawsuit survives this initial trip to the Supreme Court, lower courts will have a chance to consider whether the plaintiffs' arguments have merit.