(Bloomberg) -- Alphabet Inc.’s Google was accused in an antitrust lawsuit of giving itself the edge in online advertising by cutting a cozy deal with Facebook that gives the social network an advantage in virtual auctions which determine whose ads appear where.

The deal has allowed Google to retain its dominance in online advertising while keeping other advertisers on the sidelines and limiting revenue for online publishers, two Massachusetts companies claimed in a proposed class-action lawsuit.

A so-called header bidding system devised in 2014 enabled publishers to direct a user’s browser to solicit real-time bids from multiple exchanges, not just Google’s, according to the complaint. Facebook initially embraced the system, but as part of a 2018 deal with Google, it agreed to limit its program in return for preferential treatment in Google’s ad business, the Massachusetts companies claimed in the complaint, filed Tuesday in San Francisco federal court.

“When Google’s market power was threatened, it cut off innovation and competition through an agreement with Facebook,” the companies said.

Their agreement “restricted the innovation of header bidding to their benefit and in direct hindrance of competition” and violates federal antitrust law, according to the complaint.

Google is responsible for all damages advertisers suffered, the Massachusetts companies said.

The case is SkinnySchool LLC v. Google LLC, 3:21-cv-06011, U.S. District Court, Northern District of California (San Francisco).

©2021 Bloomberg L.P.