Minnesota will receive $3.1 million through settlements reached in three multi­state health care fraud-related lawsuits filed against Walgreens and Johnson & Johnson.

The largest share of the money, more than $2.1 million, comes from a $120 million settlement reached this month in a lawsuit filed by Minnesota and 45 other state attorneys general against Johnson & Johnson that alleged its subsidiary, DePuy, made misleading claims about how long its metal-on-metal hip-implant devices would last. The devices failed faster than DePuy claimed, according to Minnesota Attorney General Keith Ellison, requiring implant revision surgeries and causing pain, allergic reactions and other adverse health effects.

Minnesota was also part of two lawsuits filed by numerous states against Walgreens that began as whistleblower complaints. One suit, from which Minnesota will recover more than $761,000, alleged that Walgreens knowingly sent “hundreds of thousands” more insulin pens than needed to Medicare, Medicaid and other federal health care beneficiaries — improperly billing the federal health programs in the process.

Walgreens will also pay more than $212,000 to Minnesota after settling a separate lawsuit alleging that it overbilled Medicaid by not disclosing lower drug prices offered to the public through a discount program.

“Part of being able to afford your life is being able to trust that health care companies are being honest with you,” Ellison said in a statement Thursday. “In these cases, we succeeded in holding two companies accountable for fraud and deceptive practices that cost people money and resulted in pain and extra medical procedures.”