WASHINGTON — The Supreme Court on Monday allowed an enormous antitrust class action against Apple to move forward, saying consumers should be allowed to try to prove that the technology giant had used monopoly power to raise the prices of iPhone apps.

The lawsuit is in its early stages, and it must overcome other legal hurdles. But the case brings the most direct legal challenge in the United States to the clout that Apple has built up through its App Store. And it raises questions about how the company has wielded that power, amid a wave of anti-tech sentiment that has also prompted concerns about the dominance of other tech behemoths such as Facebook and Amazon.

The court’s 5-to-4 vote featured an unusual alignment of justices, with President Trump’s two appointees on opposite sides. Justice Brett M. Kavanaugh, who joined the court in October, wrote the majority opinion, which was also signed by the court’s four more liberal justices. Justice Neil M. Gorsuch, who joined the court in 2017, wrote the dissent.

The class-action lawsuit focuses on the fees that Apple takes on sales in its App Store, which millions of people use every day to download games, messaging apps and other programs. The company charges up to a 30 percent commission to developers who sell their products through its store, bars them from selling their apps elsewhere and plays a role in setting prices. App makers have long complained that the fee and other practices are unfair.