MONTPELIER, Vt. — A financially troubled chain of drug-testing labs has agreed to pay $6.75 million to the Vermont Medicaid program to settle overbilling claims by state regulators, officials said Monday.

Vermont Labs will be allowed to make the payments over a seven-year period, ensuring the independent toxicology lab’s financial viability as the region grapples with an epidemic of opioid addiction while also ensuring that corrective actions prevent future billing problems.

“This settlement balances the ongoing needs for drug testing services in Vermont with ensuring proper billings for services rendered and safeguarding of state and federal monies,” Attorney General William H. Sorrell said in a statement.

The investigation revealed that Burlington Labs violated Medicaid rules during a six-month period in 2015 by overcharging for drug tests.

The investigation and debt led to concerns about the viability of the company, which plays a role in keeping addicts in recovery accountable to their treatment programs.

So far this year, Burlington Labs has processed more than 40,000 urine samples from more than 2,300 patients around Vermont. The company has offices in Barre, Bennington, Burlington, Middlebury, Morrisville, Rutland, St. Albans and Springfield. A location in White River Junction is slated to open late this year.