Walgreens has entered into an agreement with federal prosecutors in Manhattan to settle Medicaid and Medicare fraud allegations in two separate actions brought against the national pharmacy chain, according to court records unsealed by U.S. District Judge Paul Crotty of the Southern District of New York Tuesday.

The company agreed to pay more than $209 million to resolved that it improperly billed federal health care programs for hundreds of thousands of insulin pens provided to Medicare and Medicaid beneficiaries who did not need the diabetes medication. Additionally, Walgreen's agreed to a $60 million payment for overbilling Medicaid for medications offered to consumers through a discount program.

“Medicare and Medicaid provide essential healthcare coverage to millions of people across this country. The financial integrity of these programs depends on truthful and accurate billing by pharmacies like Walgreens,” U.S. Attorney Geoffrey Berman said in a statement. “Overbilling and improper billing of Medicare and Medicaid unduly burden taxpayers and put the solvency of these vital healthcare programs at risk.”