Mylan has agreed to pay $465 million to settle claims that the Pennsylvania-based ­drugmaker misclassified its EpiPen allergy medication to avoid paying Medicaid rebates.

The settlement ends a qui tam action initiated by drugmaker Sanofi-Aventis and Ven-A-Care, a Florida pharmacy, that alleged Mylan improperly classified the EpiPen as a generic drug in an effort to ­underpay rebates owed to Medicaid. The suit specifically alleged the company violated the False Claims Act.

The U.S. Attorney's Office for the District of Massachusetts, which handled the case, announced the agreement Thursday morning.