Competition is supposed to keep prices down, so why did the cost of emergency allergy treatment EpiPen continue to soar after the introduction of a competing product? Because, according to a new lawsuit, most of that added money was going to intermediaries who could make sure that EpiPen remained the preferred (and sometimes only) drug of its kind on insurance plans.

The lawsuit [PDF] was filed earlier this week by French pharma company Sanofi, which had previously sold Auvi-Q, an epinephrine injector intended to take away some of EpiPen’s 99% market share.

Sanofi brought Auvi-Q, which is smaller than the EpiPen injector and provides audio instructions on use for people who may not be familiar with how to properly inject someone experiencing anaphylaxis, to the U.S. market in 2013.

The company alleges that EpiPen parent company Mylan didn’t respond by lowering its price or improving its product, but instead “erected artificial barriers to U.S. consumers’ access to and use of Auvi-Q.”

The lawsuit accuses Mylan of paying out “unprecedented rebates to commercial insurance companies, pharmaceutical benefit managers, and state-based Medicaid agencies conditioned exclusively” on the requirement that these providers would not reimburse people for Auvi-Q.

If you’re not familiar with the incredibly confusing world of prescription drugs, here’s a very entry-level primer: insurance companies typically have a few tiers of prescription drugs they cover. Medications in the top tiers are given priority, usually because they represent the lowest-cost but still effective version of a drug. Then there are drugs that your insurance might cover, but for which you’d have to get prior authorization from your insurer. Finally, there are medications that your plan simply won’t cover; if you want that specific drug, you’ll probably have to go out of pocket.

Sanofi claims that before Auvi-Q entered the U.S. market, epinephrine injectors were generally treated as a top-tiered drug, without any need for prior authorization, and not omitted from insurance coverage. And when Auvi-Q launched, the company says the product was indeed covered by many of the biggest insurers.

Then, according to the lawsuit, around May 2013, Sanofi says Mylan began to offer rebates to insurer and pharmacy benefits managers (PBMs) of at least 30%, but only if EpiPen was the only epinephrine injector covered by their plans. As a result, the complaint contends that Auvi-Q was either completely removed from insurers’ formularies or pushed into the “prior authorization” category.

Sanofi says that before Auvi-Q entered the market, Mylan’s rebate programs — when they even existed — were significantly smaller, returning less than 10% to insurers and PBMs. The lawsuit says the subsequent larger rebate payouts led to a situation the insurers and PBMs couldn’t turn down, and which Sanofi couldn’t match.

“Mylan used its monopoly market share and large rebates to coerce third-party payors to choose between accepting Mylan’s huge rebates to exclusively cover the EpiPen, or foregoing those rebates to allow Auvi-Q to compete on the market,” reads the lawsuit, also claims that Mylan singled out Auvi-Q for exclusion from insurance coverage, while not requiring that insurers deny coverage to competition from other, smaller producers.

Sanofi’s efforts to match the EpiPen rebate fell on deaf ears, says the company, as insurers and PBMs realized it would be “irrational” for them to go against Mylan. If they had taken the Sanofi rebates and reinstated Auvi-Q on their lists of covered drugs, they would have had to turn away the rebate they were being offered for EpiPen exclusivity.

The problem for Sanofi was that EpiPen controlled about 90% of the market share, and no insurer would have said no to rebates on 90% of a billion-dollar business just to get the same level of rebate on a fraction of the business.

These allegations echo claims raised in a recent lawsuit brought by EpiPen customers, who noted that Mylan made up for these rebates, not by reducing its net earnings on the device, but by raising the sticker price. According to that lawsuit, between 2014 and 2016, Mylan’s retail price for EpiPen shot up 60%, but nearly all of that was being paid out in rebates.

Sanofi goes further, arguing that price hikes in the years leading up to the launch of Auvi-Q were done in preparation of using rebates to push out any new competition. Between 2009 and 2012, the price of an EpiPen twin-pack increased from $100 to $250. By raising that price, claims the lawsuit, Mylan was able ultimately offer a more attractive rebate when Auvi-Q came along.

“Put simply, a 30% rebate on a single $100 EpiPen two-pack equates to a $30 rebate for a rival to match,” explains the complaint, “whereas a 30% rebate on a single $250 EpiPen two-pack is $75. That is an additional $45 (or 250%) more a rival would now have to match on a single EpiPen two-pack.”

And again, even if a competitor could match that dollar amount, it would be on a significantly smaller share of the market. Think of two drugs, both priced $250 and both offering rebates of $75 to PBMs. If Mylan sells 90 out of 100 devices, that’s $6,750 in rebates for those third party companies, compared to only $750 in rebates from Sanofi.

In addition to exclusivity deals with private insurance providers, Sanofi says Mylan made similar arrangements with a number of state Medicaid groups that prevented Auvi-Q from being available to millions of Americans. For example, up to 25% of people purchasing epinephrine injectors in Florida do so through Medicaid, but since Auvi-Q was not covered by the state’s preferred drug list, it was unavailable to all of those people (unless they insisted on paying full price).

It was recently revealed that Mylan sued West Virginia in 2015 when it tried to replace EpiPen with Auvi-Q on its Medicaid preferred drug list, even though the state had concluded that this switch would have saved taxpayers a significant amount of money.

One of the keys to EpiPen’s growth in the last decade has been the EpiPen4Schools program, which was launched in 2012 (just before the debut of Auvi-Q) and provides injectors to schools to have on hand for emergencies. Some 65,000 schools nationwide take part in the program. However, getting these free injectors came with a catch: each school had to agree to not purchase any competing products for the next year.

So even if their supply of free injectors ran out or expired, they could only replace them with EpiPens. Additionally, some states have so-called “EpiPen Laws” requiring that they have a certain number of these devices on hand.

“Public schools with limited budgets would have no choice but to accede to Mylan’s contractual commitment,” reads the Sanofi lawsuit. Mylan later abandoned the exclusivity requirement for the schools program, which Sanofi contends is evidence of “consciousness of guilt.”

The complaint also claims that Mylan engaged in a smear campaign, using its EpiPen exclusivity deals to imply that Auvi-Q was somehow inferior to EpiPen. The lawsuit includes this chart, showing all the insurance plans on which Auvi-Q was “Restricted,” but without mentioning that these restrictions may have been due to exclusivity requirements in order to receive rebates from Mylan:

In fact, notes the lawsuit, the disclosure on this flyer only stated that “Health plans and PBMs make formulary decisions based on internal clinical and financial recommendations.”

Sanofi no longer produces Auvi-Q. In 2015, around 500,000 units of the drug were recalled over dosing concerns, and it has not returned to pharmacies since. However, the device’s original maker, Kaleo, has plans to reintroduce Auvi-Q some time this year.

Meanwhile, the price of an EpiPen twin-pack now hovers above $600. In late 2016, in response to increased scrutiny from the public and lawmakers, Mylan introduced a generic version of the injector at half the cost.