In a speech on Monday, Attorney General Jeff Sessions said the Justice Department is striving to “bring down” both “opioid prescriptions” and “overdose deaths.” A study published the following day suggests those two goals may be at odds with each other, highlighting the potentially perverse consequences of trying to stop people from getting the drugs they want.

Columbia University epidemiologist David Fink and his colleagues systematically reviewed research on the impact of prescription drug monitoring programs, which all 50 states have established in an effort to prevent nonmedical use of opioid analgesics and other psychoactive pharmaceuticals. Reporting their results in the Annals of Internal Medicine, Fink et al. say the evidence that PDMPs reduce deaths involving prescription opioids is “largely insufficient,” adding that “implementation of PDMPs may have unintended negative outcomes — namely, increased rates of heroin-related overdose.”

The review covers 17 studies, 10 of which looked at the relationship between PDMPs and deaths involving narcotic pain relievers. Three studies “reported a decrease,” six “reported no change,” and one “reported an increase in overdose deaths.”

The picture looks worse when you take into account deaths involving illegally produced drugs, which now account for a large majority of opioid-related fatalities. Fink et al. found six studies that included heroin overdoses, half of which reported a statistically significant association between adoption of PDMPs and increases in such incidents.

To the extent that PDMPs succeed in making pain pills harder to obtain, they encourage nonmedical users to seek black-market substitutes. “Changes to either the supply or cost of prescription opioids after a PDMP is instituted,” Fink et al. observe, “might reasonably drive opioid-dependent persons to substitute their preferred prescription opioid with heroin or nonpharmaceutical fentanyl.”

Restricting access to pain pills also seems to be increasing the percentage of opioid users who begin with heroin. A 2015 survey of people entering treatment for opioid use disorder found 33 percent had started with heroin, up from 9 percent in 2005.

If the aim is preventing drug-related deaths, this shift is counterproductive, to say the least. Because their purity and potency are inconsistent and unpredictable, illegally produced opioids are much more dangerous than pain pills.

Comparing deaths counted by the federal government to its estimates of users suggests that heroin is more than 10 times as lethal as prescription opioids. Policies that drive people toward more dangerous drugs help explain why deaths involving heroin and illicit fentanyl have skyrocketed in recent years, even as opioid prescriptions have declined.

A report published last month by the health care consulting firm IQVIA shows that the total volume of opioids prescribed in the United States fell by 29 percent between 2011 and 2017, from 240 billion to 171 billion morphine milligram equivalents. According to data from the U.S. Centers for Disease Control and Prevention, deaths involving pain pills nevertheless rose by 24 percent from 2011 to 2016, while total deaths involving opioids rose by 85 percent.

That trend includes a 252 percent increase in heroin-related deaths and an astonishing 628 percent increase in deaths involving the opioid category that consists mainly of fentanyl and its analogues. Final CDC figures for 2017 are not available yet, but the provisional numbers indicate there will be more increases.

In addition to magnifying the risks that nonmedical users face, the crackdown on pain pills is hurting patients. Many people who have successfully used opioids to treat severe chronic pain for years now find it difficult or impossible to obtain the medication they need to maintain a decent quality of life.

Since the current strategy is manifestly not working, drug warriors are, as usual, redoubling their efforts. The Drug Enforcement Administration, which sets annual quotas for opioid production, reduced the limit by 25 percent in 2017 and 20 percent this year.

Sessions plans to squeeze the supply even more, because “we are facing the deadliest drug crisis in American history.” He seems determined to make it deadlier.