The U.S. government on Tuesday filed its first criminal charges against a major drug distributor and company executives over their alleged roles in fuelling the nation's opioid epidemic by putting profits ahead of patients' safety.

Rochester Drug Co-operative Inc. (RDC), one of the 10 largest U.S. drug distributors, agreed to pay $20 million US and enter a deferred prosecution agreement to resolve charges it turned a blind eye to thousands of suspicious orders for opioids.

"We made mistakes," RDC spokesman Jeff Eller said in a statement. "We accept responsibility for those mistakes."

Laurence Doud, who had been RDC's chief executive for more than 25 years, was charged in an indictment filed in Manhattan federal court with conspiring to distribute illegal narcotics and conspiring to defraud the United States. His lawyer said he plans to plead not guilty.

Another former executive, compliance chief William Pietruszewski, pleaded guilty to three criminal counts.

More than 47,000 deaths in 2017

The case marks a new U.S. effort to curtail the growing number of addictions to oxycodone and other prescription painkillers, often by people with no legitimate medical need for them.

Opioids, including prescription painkillers and heroin, played a role in a record 47,600 U.S. deaths in 2017, according to the U.S. Centers for Disease Control and Prevention.

RDC admitted to violating federal narcotics laws from January 2012 to March 2017 by distributing oxycodone, fentanyl and other controlled substances to pharmacy customers despite internal 'red flags' that they would be used improperly. (Patrick Sison/Associated Press)

Hundreds of lawsuits by state and local governments accuse drugmakers such as Purdue Pharma of deceptively marketing opioids, and distributors such as AmerisourceBergen Corp , Cardinal Health Inc and McKesson Corp of ignoring that they were being diverted for improper uses.

These defendants, as well as RDC, were among those named last month in a lawsuit by New York Attorney General Letitia James alleging widespread fraud.

3 years of compliance monitoring

The deferred prosecution agreement allows RDC to keep operating, subject to three years of independent compliance monitoring, and avoid prosecution if it complies with the terms.

RDC admitted to violating federal narcotics laws from January 2012 to March 2017 by distributing oxycodone, fentanyl and other controlled substances to pharmacy customers despite internal "red flags" that they would be used improperly.

According to court papers, RDC filled more than 1.5 million orders for controlled substances from pharmacy customers from 2012 to 2016, and reported just four out of more than 2,000 suspicious orders to the Drug Enforcement Administration.

Doud surrendered to authorities to face the two criminal conspiracy accounts against him.

His lawyer, Derrelle Janey, said Doud "is not the culprit here. We intend to fully defend against these charges."