Four pharmaceutical companies have agreed to settle False Claims Act allegations for a combined $124 million, the largest health care fraud recovery that federal prosecutors in New Hampshire have ever obtained, the Justice Department said Monday.

Mylan Pharmaceuticals Inc., UDL Laboratories Inc., AstraZeneca Pharmaceuticals and Ortho McNeil Pharmaceutical Inc. entered into settlement agreements with the Justice Department following claims that the companies failed to pay appropriate rebates to state Medicaid programs for drugs that the state programs paid for. The companies, Justice Department officials said, agreed to pay quarterly rebates to Medicaid based on the amount of money the state programs were paying for the pharmaceutical companies’ drugs.