WASHINGTON — A former senior U.S. Drug Enforcement Administration official who testified before Congress on the government's efforts to stop the opioid epidemic is now paid to advise one of the largest opioid manufacturers in the country, Purdue Pharma, according to people familiar with the matter.

Demetra Ashley, the former acting assistant administrator of the DEA who told a Senate committee in 2017 about the need for a "robust regulatory program" to stop the diversion of opioids and other controlled prescription drugs, left the DEA last spring and started a consulting firm called Dashley Consulting, LLC, according to her LinkedIn page.

Purdue Pharma, the maker of the opioid painkiller OxyContin, is one of the opioid companies being sued by more than 1,600 cities and counties for "grossly" misrepresenting "the risks of long-term use of those drugs for persons with chronic pain," according to court documents. The lawsuits have been consolidated into one case in federal court in Cleveland. Purdue vigorously denies allegations that it deceptively marketed OxyContin.

Ashley spent three decades at the DEA, specializing in preventing the diversion of prescription drugs like OxyContin.

Reached by NBC News on her cellphone in Chicago, Ashley said, "I have been consulting for members of the industry and I began my consulting business in June 2018 after I retired." Ashley said she could not confirm or deny who her clients are unless "they say it's OK."

Purdue declined comment to NBC News on its consultants.

Ashley confirmed she has been subpoenaed to be deposed in the consolidated opioid lawsuit to discuss her role at the DEA as part of the law enforcement agency's effort to stem the opioid crisis.

Purdue has reportedly made more than $35 billion from the sale of OxyContin, a figure the company has not denied.

"This should not be allowed," said Dr. Andrew Kolodny, the co-director of opioid policy research at Brandeis University. "Former DEA and FDA officials should not be allowed to take money from companies they regulated." Kolodny has been a paid consultant for plaintiffs in suits against the Purdue Pharma and the company's owners, the Sacklers.

Kathleen Clark, a law professor at Washington University and an expert in government ethics, said situations like Ashley's "raise a question in the mind of the public — whether the prospect of a payday after leaving government tainted the actions of the regulator while still in government. Did this person act differently in government because they anticipated or wanted to get the payday from these very powerful economic actors who have huge amounts at stake?"

There is no indication that Ashley's consulting arrangement with Purdue is illegal.

During testimony to the Senate Judiciary Committee on Dec. 12, 2017, Ashley said: "The over-prescribing and abuse of controlled prescription drugs (CPDs) is inextricably linked with the threat the United States faces from the trafficking of heroin, illicit fentanyl and fentanyl analogues. ... The United States continues to be affected by a national opioid epidemic, which has been spurred, in part, by the rise of abuse of prescription opioids."

Ashley said that 3.4 million Americans reported misusing prescription painkillers in 2016, and the scope of the opioid problem "underscores the need for a robust regulatory program that seeks to stop diversion of CPDs."

'Wheels of justice'

The avalanche of legal cases against opioid manufacturers and distributors has been likened to the lawsuits the tobacco industry faced, which were settled in 1998 for $206 billion.

The difference between opioids and tobacco is that patients were told by their doctors to take opioids. For tobacco users, tobacco was a personal choice.

The first opioid trial from the consolidated cases is scheduled for Oct. 21, according to the website for the multidistrict litigation.

But that's not the only upcoming trial for Purdue Pharma.

Oklahoma Attorney General Mike Hunter will have the first crack at a trial May 28, in Cleveland County, Oklahoma. Hunter is suing opioid manufacturers including Purdue Pharma, Allergan, Cephalon and Janssen Pharmaceuticals.

The judge in the case, District Judge Thad Balkman, recently denied a request by the opioid defendants to delay the trial saying, "the wheels of justice will continue to turn unimpeded."

Balkman has ruled that cameras could be allowed in the courtroom during the upcoming trial saying, "Unquestionably, the issues presented in this matter are of great importance to the citizens of Oklahoma."

But just a few days ago, Purdue Pharma asked the judge to reconsider, arguing that "a televised trial in this matter will be fundamentally unfair. It will deny Purdue due process." The company's renewed effort to get rid of cameras in the courtroom was first reported by Law360.

NBC News previously reported that in the face of more than 1,000 suits, Purdue Pharma is exploring options that include bankruptcy.

In a statement, Purdue Pharma told NBC News that the company "continues to have active discussions with attorneys general, and is fully engaged with the multidistrict litigation process ... to help communities address the nation’s opioid crisis."

"We will continue to work collaboratively with the various jurisdictions toward bringing meaningful solutions forward to address this public health challenge. We vigorously deny allegations that Purdue acted improperly by communicating with prescribers about scientific and medical information that FDA has expressly considered and continues to approve. We believe it is inappropriate to substitute the judgment of the plaintiffs for the judgment of the regulatory, scientific and medical experts at [the Food and Drug Administration]."

CLARIFICATION (Oct. 28, 2019, 5:45 p.m. ET): An earlier version of this article should have disclosed that Dr. Andrew Kolodny is a paid consultant for plaintiffs against Purdue and the Sacklers.