American pharmacies' opioid prescriptions fell in 2017 for the fifth straight year, marking the largest annual decline yet, after 20 consecutive years of rapid increases, according to a national study by IQVIA Institute for Human Data Science, based in Parsippany, N.J.

Overall dispensed opioid prescriptions fell 10.2 percent. "Patients receiving high doses [of more than] 90 morphine milligram equivalents a day declined by 16.1 percent," the institute said in a statement. The company tracks dispensed prescriptions through data feeds from wholesale, retail and hospital pharmacies and insurance claims data, said Tor Constantino, spokesman for IQVIA, formerly IMS Health, which also has offices in Plymouth Meeting and Collegeville.

Among the factors driving the downturn were "major clinical guideline shifts, payer reimbursement controls, intensive medical education efforts by state/specialty medical societies, as well as regulatory and legislative restrictions," the institute said in a statement.

Opioid painkiller prescriptions had increased in every year from 1992 to 2011, the institute noted.

That corresponds to the years in which a new generation of drug marketers backed by scientists at Perdue Pharmaceuticals, Johnson & Johnson's Janssen division, DuPont Merck spin-off Endo Pharmaceuticals, Cephalon (now part of Teva), and other drugmakers were able to persuade more doctors to boost opioid prescriptions. Those efforts were fueled by previous decades of drug company opioid marketing followed by waves of addictions, abuse and deaths.

In the 2010s, the renewed awareness of U.S. opioid painkiller abuse and overdose deaths provoked government lawsuits, criminal investigations, and medical society calls for renewed restraint in recommending opioid painkillers.

"A series of regulatory and legislative prescriptions combined with tighter clinical prescribing guidelines and greater reimbursement controls resulted in average 4 percent per year declines from 2012 through 2016," the institute report said, accelerating in 2017 to the biggest drop "in more than 25 years of measurement."

As legal opioid prescriptions finally began to decline,  there has been an increase in deaths from illegal heroin and synthetic fentanyl since 2015, the Centers for Disease Control has reported.  People who got hooked on drug company painkillers couldn't get new prescriptions of their own, and were buying less reliable drugs illegally to feed their habits.

In contrast to opioids, "spending on all U.S. medicines increased 0.6 percent to $324 billion" last year, the institute noted. The total would have been higher, but patients bought more low-cost generic drugs as an alternative to high-priced brand-name drugs; and some manufacturers have been offering discounts and coupons in an effort to boost slumping drug sales.

The big drop in high-dosage prescriptions, which the institute says are more closely tied to dependency and overdoses, "suggests that health-care professionals are prescribing opioids less often for pain treatment," Murray Aitken, director of the institute, said in a statement.

He added that new opioid prescriptions fell nearly 8 percent last year to 2.9 million a month, while medication-assisted therapies for opioid-use dependence nearly doubled, to 82,000 prescriptions a month.