Apple on Monday was fined 1.8 billion euros ($1.95 billion) by European Union regulators for thwarting competition among music streaming rivals, a severe punishment levied against the tech giant in a long-simmering battle over the powerful role it plays as gatekeeper of the App Store.

The penalty, announced by the E.U. antitrust regulator, is the culmination of a five-year investigation set in motion by one of its biggest rivals, Spotify. Regulators said Apple illegally used its App Store dominance to box out rivals.

“For a decade, Apple abused its dominant position in the market for the distribution of music streaming apps through the App Store,” said Margrethe Vestager, the European Commission executive vice president who oversees competition policy.

The action by the European Commission, the E.U. executive branch, is the latest in a series of regulations and penalties to target the App Store. Most of the disputes are because Apple requires that apps use its in-app payment service for sales. It takes as much as a 30 percent commission on each transaction, a fee that many developers say is excessive.

Regulators in the Netherlands and South Korea have passed laws or orders to force Apple to allow alternative payment services, but Apple has largely disregarded the regulators’ challenges. In those countries it is allowing alternatives but charging a 27 percent commission, a solution that regulators in the countries are contesting.

Apple said it would appeal the ruling. “While we respect the European Commission, the facts simply don’t support this decision,” Apple said in a statement on Monday.