Mylan NV has finalized a $465 million settlement with the U.S. Justice Department, resolving claims it overcharged the government for its EpiPen emergency allergy treatment, which became the center of a firestorm over price increases.

The U.S. Attorney's Office in Massachusetts revealed the accord on Thursday, 10 months after Mylan said it reached a deal resolving claims it misclassified the EpiPen as a generic rather than a branded product, underpaying rebates to state Medicaid programs as a result.

"Taxpayers rightly expect companies like Mylan that receive payments from taxpayer-funded programs to scrupulously follow the rules," Acting U.S. Attorney William Weinreb said in a statement.

The investigation followed a whistleblower lawsuit filed under the False Claims Act that rival drugmaker Sanofi SA filed in 2016, two years after it first raised the matter with investigators, Weinreb's office said.

As a result of the settlement, Sanofi will receive $38.7 million as a reward, authorities said.

"Bringing closure to this matter is the right course of action for Mylan and our stakeholders to allow us to move forward," Mylan Chief Executive Heather Bresch said in a statement.

Mylan shares gained 1 percent to $30.76 on the Nasdaq.

Sanofi did not immediately respond to a request for comment.

The EpiPen, which Mylan acquired in 2007, is a handheld device that treats life-threatening allergic reactions by automatically injecting a dose of epinephrine.

Mylan came under fire last year after raising the price of a pair of EpiPens to $600, from $100 in 2008, and listing it with Medicaid as a generic product even though it is listed with the U.S. Food and Drug Administration as a branded one.

The price increase enraged consumers and put the drugmaker at the center of the ongoing debate over the high cost of prescription medicines in the United States.

Mylan has since offered its own generic version for about $300 in response to the furor.

The Justice Department settlement centered on claims that Mylan misclassified the EpiPen as a generic product, which under Medicaid does not require the same level of rebates as brand-name products.

The $465-million settlement has previously come under attack by members of Congress in both parties who have called it too small.

An analysis by the U.S. Department of Health and Human Services' Office of Inspector General released in May found the U.S. government may have overpaid for EpiPens by as much as $1.27 billion between 2006 and 2016.