The US Department of Justice and 16 state and district attorneys general accused Apple of operating an illegal monopoly in the smartphone market in a new antitrust lawsuit.

The DOJ and states are accusing Apple of driving up prices for consumers and developers at the expense of making users more reliant on its iPhones. It alleges that Apple “selectively” imposes contractual restrictions on developers and withholds critical ways of accessing the phone, according to a release.

“Apple exercises its monopoly power to extract more money from consumers, developers, content creators, artists, publishers, small businesses, and merchants, among others,” the DOJ wrote in a press release.

The government points to several different ways that Apple has allegedly illegally maintained its monopoly:

“Apple responded to competitive threats by imposing a series of ‘Whac-A-Mole’ contractual rules and restrictions”

“For years, Apple responded to competitive threats by imposing a series of ‘Whac-A-Mole’ contractual rules and restrictions that have allowed Apple to extract higher prices from consumers, impose higher fees on developers and creators, and to throttle competitive alternatives from rival technologies,” DOJ antitrust division chief Jonathan Kanter said in a statement.

The case is being filed in the US District Court for the District of New Jersey.

Apple is the second tech giant the DOJ has taken on in recent years after filing two separate antitrust suits against Google over the past two administrations. It’s reversed a long drought of tech monopolization cases since the landmark Microsoft lawsuit at the turn of the century. The case has been years in the making, with reports first surfacing in June 2019 that the DOJ would get to handle antitrust investigations into the company.

App developers for Apple’s iOS have complained for years of the platform’s closed and often opaque marketplace. Among the most vocal have been companies like Spotify that run paid subscription services that Apple requires a 15 to 30 percent cut of to be offered on its platform. On top of that, Apple has its own apps that compete with those on its app store — the only place Apple lets users download apps for what it says are security reasons — which has raised even more distrust among developers about whether they are getting a fair shot in the marketplace.

The House panel found Apple had a monopoly over iOS app distribution

Some developers were able to get the ear of Congress as a House subcommittee carried out its own investigation of the tech giants a few years ago. A 2020 report by that panel found that Apple held monopoly power in the market for app distribution on iOS. Lawmakers introduced legislation like the Open App Markets Act and the American Innovation and Choice Online Act that sought to prevent large platforms like Apple from giving their own products an advantage on their marketplaces over competitors. But more than two years since they were introduced, neither has received a vote on the floor of either chamber.

Europe has moved ahead of the US in its efforts to rein in tech. It’s instituted new rules through the Digital Markets Act to place a check on the power of gatekeepers of large platforms, several of which are operated by Apple. Earlier this month, the European Commission fined Apple €1.84 billion (about $2 billion) in connection to a complaint from Spotify about its restrictive app store practices. The EU said its investigation found that “Apple bans music streaming app developers from fully informing iOS users about alternative and cheaper music subscription services available outside of the app.”

The DOJ will have its hands full with tech monopoly suits in the coming years. It wraps up closing arguments in its search distribution case against Google in May and then is set to begin trial in a case over Google’s advertising technology in the fall.