Colorado will receive $18 million as part of a broader settlement with one of the largest manufacturers of prescription opioid pills, the Attorney General's Office announced Tuesday.

Mallinckrodt manufactured oxycodone, the generic for OxyContin, and one of the company's subsidiaries distributed nearly 29 billion pills in the United States between 2006 and 2012, the AG's office said in a statement.

Its $18 million settlement payment to Colorado joins nearly $400 million in settlements from three other manufacturers and Johnson & Johnson, money that will be distributed in Colorado over the next 18 years.

The state has also received $10 million from consultant McKinsey & Company, and it should get $110 million more from other settlements involving other pharmaceutical companies, including Purdue Pharma, which sold OxyContin.

“For years, Mallinckrodt pushed millions of opioid pills into our communities, and now the company is paying for the addiction crisis they contributed to and the harm they caused," Attorney General Phil Weiser said in a statement. " ... The $520 million dollars we have worked to secure will help local communities to provide much needed drug treatment, recovery, and prevention programs."

Mallinckrodt's settlement will be broken up and distributed to Colorado counties and regions. Some will also be placed under state control. The company, which filed for bankruptcy two years ago, also agreed to restrictions on marketing of opioids and to release documents related to its role in the opioid epidemic.

Regions across Colorado are drafting plans to spend the first two years' worth of the broader settlement money.