A federal judge peppered attorneys for Apple and Epic Games with pointed questions Monday on the workings of the massive Apple online marketplace as a high-stakes trial with implications for the mobile commerce world concluded.

US District Court Judge Yvonne Gonzalez Rogers heard closing arguments in the case brought by Epic in its bid to break Apple's tight grip on its App Store, and potentially disrupt the entire mobile ecosystem.

In the closely watched antitrust case, in federal court in California, Epic lawyer Gary Bornstein argued that Apple is portraying itself as a "benevolent overlord" of the App Store even it that means competition is stifled.

Apple attorney Richard Doren countered that Epic is seeking to essentially run its own app shop on the iPhone maker's platform, paying nothing and undermining user security in the process.

The judge posed skeptical questions to both sides, without offering clues on how she would rule in the case.

"One of the issues that has concerned me, is that your client does not seem interested in paying for access to customers on iOS," Rogers said to Epic attorneys.

Epic, she said "is attacking the fundamental way in which Apple is generating revenue."

Her questions Monday followed a surprisingly harsh interrogation of Apple chief executive Tim Cook, who was on the witness stand Friday.

She suggested to Cook that Apple's commission on app sales, which can be as high as 30 percent, appeared disproportionate," adding that, "After that first interaction.. the developer is keeping those customers, Apple is just profiting from them."

Epic, maker of the popular Fortnite video game, is seeking to force Apple to open up the App Store to third parties seeking to circumvent Apple's procedures payment systems.

Apple booted Fortnite from its App Store last year after Epic dodged agreed-upon revenue sharing with the iPhone maker.

Rogers questioned attorneys about how the court is expected, or entitled, to tinker with the running of the App Store.

Apple CEO Tim Cook is seen at a 2019 event by the iPhone maker, which is being sued over its tight control of its App Store
Apple CEO Tim Cook is seen at a 2019 event by the iPhone maker, which is being sued over its tight control of its App Store GETTY IMAGES NORTH AMERICA / Michael Short

"Courts do not run businesses," Rogers said at one point.

Rogers pointed out that Epic is suing Google in a different federal court over the market power of the Play store, while apparently asking her to order that the App Store be more like its Android equivalent.

The judge told attorneys that she will issue her verdict in writing while memories "are still fresh" but it could take a while.

Some analysts said Epic's case appeared stronger than initially believed, although the outcome remained uncertain.

"Things have moved meaningfully in Epic's direction over the last few days," said Richard Windsor, founder of research firm Radio Free Mobile.

"Unfortunately, I suspect that this case is going to drag on for years and will end up being decided by the Supreme Court."