Pharmaceutical company Mylan sued West Virginia in 2015 to keep its EpiPens on the state’s “preferred drug list,” which, if successful, would mean that the state’s Medicaid programs would have to automatically pay for the pricey epinephrine auto-injectors.

The bold and unusual move by Mylan—which ultimately failed—is yet another example of the aggressive marketing and legal tactics the company used to boost profits from EpiPens, which halt life-threatening allergic reactions. Since Mylan acquired rights to EpiPen in 2007, the company raised its price by more than 400 percent. Mylan also allegedly made illegal deals with schools to undercut competitors and allegedly scammed federal and state regulators out of millions in rebates by knowingly misclassifying the device.

Last year, EpiPen’s sales and expanded markets brought in more than $1 billion in revenue for Mylan. The company’s CEO, Heather Bresch, is one of the highest-paid CEOs in the industry, earning nearly $19 million annually.

But before public rage swelled, it seems states were quietly battling with the pharmaceutical giant. In 2015, West Virginia made the decision to swap EpiPens for a competitor out of a simple cost-cutting effort. Mylan pushed back with dubious claims. Newly discovered court documents, reported by Stat, show that Mylan argued that the state’s decision would put patients at risk, making them use an alternative device in an emergency after they had grown accustomed to EpiPen. The company also alleged that the state’s decision to change its drug list was done illegally, in private closed-door meetings.

Yet, researchers have found that patients can use alternative auto-injectors just fine. And the committee that oversees the state’s drug list made the decision to ditch EpiPen during a public meeting with an open vote.

“[Mylan’s] action seeks to do one thing: Protect a pharmaceutical giant’s market share to the detriment of the West Virginia Medicaid program and create a monopoly over a specific class of drug in this State,” West Virginia’s attorneys argued in a motion to dismiss the case.

And West Virginia wasn’t the only state pestered by Mylan, Stat noted. When Minnesota slashed EpiPen from its preferred drug list, lawyers representing the company sent threatening letters.

“I hope to resolve this issue amicably with [the state],” an attorney wrote. “Please understand, however, that Mylan Specialty is prepared to take all appropriate action necessary to mitigate the health risk to Medicaid patients in Minnesota who are affected by [this] decision if we are unsuccessful in obtaining a reversal of [this] decision.”

Both Minnesota and West Virginia didn’t back down. EpiPens are currently no longer on the states’ preferred drug lists. And many other states have also cut them from their lists.