Dozens of medical professionals in five states, including doctors who allegedly traded prescriptions for sex, were charged with participating in a scheme in which they prescribed more than 32 million opioids and other dangerous narcotics, federal prosecutors announced Wednesday.

Those indicted include 31 doctors, seven pharmacists, eight nurse practitioners, seven other licensed medical professionals, and others who owned, operated or worked at clinics.

The charges involve more than 350,000 illegal prescriptions written in Alabama, Kentucky, Ohio, Tennessee and West Virginia, according to indictments unsealed in federal court in Cincinnati.

Several pharmacists and a doctor in Ohio who is alleged to have at one time been the highest prescriber of controlled substances in the state, are charged with operating an alleged “pill mill” in Dayton, Ohio. Between October 2015 and October 2017, the pharmacy allegedly dispensed more than 1.75 million pills.

U.S. Attorney Benjamin C. Glassman, of the Southern District of Ohio, speaks beside members of Appalachian Regional Prescription Opioid Strike Force, during a news conference, on April 17, 2019, in Cincinnati. John Minchillo / AP

A doctor in Tennessee who allegedly branded himself the “Rock Doc,” is accused of prescribing powerful and dangerous combinations of opioids and psychoactive drugs, sometimes in exchange for sexual favors over the span of almost three years, officials said. The doctor allegedly prescribed approximately 500,000 hydrocodone pills, 300,000 oxycodone pills, 1,500 fentanyl patches and more than 600,000 benzodiazepine pills.

Another doctor in Tennessee is charged with controlled substance violations for allegedly prescribing approximately 4.2 million opioid pills — sometimes in dangerous combinations with other drugs — including to known addicts.

A doctor in Alabama is accused of recruiting prostitutes and other young women with whom he had sexual relationships to become patients at his clinic, while simultaneously allowing them and their associates to abuse illicit drugs at his house, federal prosecutors said.

The charges include unlawful distribution or dispensing of controlled substances by a medical professional and health care fraud. Most of the defendants face charges of unlawful distribution of controlled substances involving prescription opioids.

In October 2017, President Donald Trump declared the opioid epidemic a national health emergency, directing federal agencies to use resources to fight the crisis.

“The opioid epidemic is the deadliest drug crisis in American history, and Appalachia has suffered the consequences more than perhaps any other region,” Attorney General William P. Barr said in a statement Wednesday.

West Virginia leads the nation in drug overdose deaths, Centers for Disease Control and Prevention data shows, followed by Ohio. West Virginia had an age-adjusted drug overdose death rate of 57.8 per 100,000 people, according to the National Center for Health Statistics.

Almost 218,000 people died from overdoses related to prescription opioids from 1999 to 2017 — the latest year that federal overdose data is available. The opioid epidemic in the United States claimed the lives of 47,600 people in 2017, five time the amount it did in 1999, according to the CDC.