Purdue Pharma pleaded guilty to federal criminal charges related to the marketing and distribution of its opioid painkiller OxyContin, The New York Times reports.

The move formally ended a major investigation that led to a multibillion-dollar settlement between Purdue Pharma and the government, the article notes.

Steve Miller, Purdue’s chairman, said in a hearing in federal court that in order to meet sales goals, the company told the Drug Enforcement Administration it had created a program to prevent OxyContin from being sold on the black market. However, the company was marketing OxyContin to more than 100 doctors suspected of illegally prescribing the drug.

The company also pleaded guilty to paying illegal kickbacks to doctors who prescribed OxyContin, and to an electronic health records company for targeting doctors with alerts designed to increase opioid prescriptions.