The consulting firm McKinsey & Company has agreed to pay $573 million to settle investigations into its role in the opioid crisis, The New York Times reports.

The company reached an agreement with attorneys general in 47 states, five territories and the District of Columbia. McKinsey will not admit wrongdoing in the settlement, but will agree to court-ordered restrictions on its work with some kinds of addictive narcotics, the article notes. States will use the funds for opioid treatment, prevention and recovery programs.

McKinsey was criticized for its role in the opioid crisis after documents released in a federal bankruptcy court revealed that the firm advised members of the Sackler family, the owners of OxyContin maker Purdue Pharma, to consider giving the company’s distributors a rebate for every overdose attributable to the pills they sold.