WASHINGTON — The number of new monthly prescriptions for medications that treat opioid addiction nearly doubled over the past two years, according to new data, while prescriptions for opioid painkillers continued to decline.

The changing calculus reflects a stepping up of efforts among policymakers and the medical establishment to address the nation’s opioid epidemic, which is killing more than 115 people every day. But it also underscores questions about whether some pain patients are now being undertreated, and whether tightened prescribing over the last few years has contributed to the surge in overdose deaths from heroin and especially fentanyl.

Although the number of people taking medications to combat addiction is rising, it remains a small fraction of the roughly 2.6 million people believed to suffer from “opioid use disorder,” or addiction. The federal government has estimated that about 20 percent of them are getting some kind of treatment, but of those, only about a third are getting buprenorphine, naltrexone or methadone, the three medications approved by the Food and Drug Administration.

Prescriptions for opioid painkillers have been dropping since 2011, but the trend accelerated last year with a decline of 10 percent from January through December, according to the IQVIA Institute for Human Data Science, which studies prescription drug use and spending. The highest-dose prescriptions, equivalent to 90 milligrams or more of morphine daily, dropped even more sharply, by 16 percent. Over the course of 2016, high-dose prescriptions dropped by 14.3 percent and opioid prescriptions over all dropped by 1.5 percent.