Pharmaceutical companies that manufacture or distribute highly addictive pain pills have hired dozens of officials from the top levels of the Drug Enforcement Administration during the past decade, according to a Washington Post investigation.

The hires came after the DEA launched an aggressive campaign to curb a rising opioid epidemic that has resulted in thousands of overdose deaths each year. In 2005, the DEA began to crack down on companies distributing inordinate numbers of pills such as oxycodone to pain-management clinics and pharmacies around the country.

Since then, the pharmaceutical companies and law firms that represent them have hired at least 42 officials from the DEA – 31 of them directly from the division responsible for regulating the industry, according to work histories compiled by The Washington Post and interviews with agency officials.

The number of hires has prompted some current and former government officials to question whether the companies raided the division to hire away DEA officials who were architects of the agency’s enforcement campaign or were most responsible for enforcing the laws the firms were accused of violating.

“The number of employees recruited from that division points to a deliberate strategy by the pharmaceutical industry to hire people who are the biggest headaches for them,” said John Carnevale, who was former director of planning for the White House’s Office of National Drug Control Policy and now runs a consulting firm. “These people understand how DEA operates, the culture around diversion and DEA’s goals, and they can advise their clients how to stay within the guidelines.”

The DEA’s Diversion Control Division, tasked with preventing prescription drugs from reaching the black market, wields enormous power within the pharmaceutical world. The small division, with about 300 employees at its Arlington, Va., headquarters, can suspend or revoke the licenses of doctors, pharmacies and pharmaceutical companies that fail to comply with federal law.

From 2000 to 2015, nearly 180,000 people have died of overdoses from prescription painkillers in what public health authorities have called an epidemic. States including Massachusetts, and most recently Virginia, have declared public health emergencies as the number of deaths has escalated.

It is not unusual for corporations to hire federal employees directly away from the government. Their expertise and inside knowledge can be invaluable, but there are laws and regulations to slow the “revolving door” in Washington and prevent potential conflicts of interest.

The restrictions include a lifetime ban on participating “personally and substantially” on a “particular matter” that the official had handled while working for the federal government. There also is a two-year ban on switching sides on a wider array of matters that were in the employee’s official purview. State bar associations impose additional post-employment restrictions for government lawyers.

An industry spokesman said former DEA diversion officials are hired for their expertise.

“Our industry is highly specialized, and the function of drug diversion experts even more so,” said John M. Gray, president of the Healthcare Distribution Alliance, which represents drug distributors. “As such, for these individuals who want to continue to grow in their areas of expertise, it is logical for them to pursue government and industry roles that are closely aligned with their professional experience.”

While The Post did not find evidence that the officials violated conflict-of-interest regulations, the number of hires from one key division shows how an industry can potentially blunt a government agency’s aggressive attempts at enforcement.