Mylan (NASDAQ:MYL) has reached an agreement to pay $465 million to settle charges that company overcharged Medicaid for the allergy treatment EpiPen. Mylan will take the entire charge in the third quarter to pay for the settlement. Government spending on the EpiPen totaled nearly $1.3 billion from 2011 to 2015. It has not been disclosed how much was overpaid by the agency.

Mylan was accused of improperly classifying the treatment as a generic drug to reduce its rebate amount, leading the Medicaid and Medicare programs to overpay for the product. There is a big difference in rebates when a drug is classified as a brand-name versus when it is classified as a generic. Manufacturers of brand-name drugs pay rebates to the government of about 23 percent off the average manufacturers’ price, while the makers of generic drugs pay 13 percent. That 10 percent difference can result in massive savings for the company. Brand-name manufacturers must also pay more in rebates if their products’ prices rise faster than inflation.

EpiPen’s designation as a generic dates back decades, even prior to Mylan buying the product in 2007. However, Mylan has the exclusive right to sell the drug as part of a patented auto-injector, even though the drug used, epinephrine, is available as a cheap generic. According to statements by the federal government, Mylan was told multiple times that it was wrongly classifying the EpiPen. The company agreed that the EpiPen would be classified as a branded drug beginning in April of next year.

The settlement, made with the Justice Department and other government agencies, is a remarkably fast resolution to the issue. Over the summer, several United States senators wrote to the Centers for Medicare and Medicaid Services, the agency that oversees the Medicaid program, asking questions about the drug classification by Mylan. Senator Amy Klobuchar, Democrat of Minnesota, said she was pleased with the settlement. In a statement, Mylan said the settlement did not imply any admission of wrongdoing. The Medicaid agency said earlier this week that it was undertaking a “comprehensive review” to see if other companies have also misclassified their drugs.

Mylan has been under intense scrutiny recently over its pricing practices. The company has raised the price of EpiPen from about $100 for a pack of two when it bought the product to more than $600 this summer. Mylan has announced plans to begin selling a generic version of the EpiPen at a lower list price.

The company also lowered its earnings guidance to between $4.70 and $4.90 a share, lower than its previous estimate of $4.85 to $5.15. The financial implications of previously announced changes to its patient access programs for the EpiPen was cited as the reason for the revised guidance.

Get Analysts' Upgrades and Downgrades Daily - Enter your email address below to receive a concise daily summary of analysts' upgrades, downgrades and new coverage with's FREE daily email newsletter.