WASHINGTON — Overdoses don’t happen just to heroin addicts – patients who legally use strong painkillers called opioids are at risk in the nation’s epidemic, too. A new study says when patients were prescribed an overdose antidote along with those medications, they made fewer painkiller-related visits to the emergency room.

Hospitals and first responders have long used the antidote naloxone to revive people who’ve stopped breathing because of an opioid overdose. Increasingly, take-home doses also are given to friends or family of people struggling with substance abuse to keep on hand in case of emergency.

The study released Monday went a step further – to see if the take-home antidote idea also could work for patients with chronic pain who may not realize they could accidentally get into trouble with prescription painkillers such as Oxycontin, Vicodin and others.

“Patients don’t see themselves at risk for overdose,” said lead researcher Dr. Phillip Coffin of the San Francisco Department of Public Health. “We’re prescribing naloxone for risky drugs, not risky patients.”

The Centers for Disease Control and Prevention says between 1999 and 2014, more than 165,000 people in the U.S. died of overdoses related to opioid pain medications. Taking too much, either deliberately or accidentally, isn’t the only worry. Other illnesses and medications sometimes can make a usually tolerated opioid dose risky.

San Francisco already has seen a drop in heroin deaths from targeted naloxone distribution. On the prescription painkiller side, Coffin’s team told six primary care clinics run by the health department to add a naloxone prescription for all patients with chronic pain who were taking long-term opioids for relief. The clinics serve publicly insured or uninsured patients. To help ensure they listened, providers were urged to say the antidote was for “bad reactions” to painkillers rather than using the word “overdose.”

About 38 percent of the 1,985 eligible patients received a prescription for the antidote and were taught to use it, researchers reported in Annals of Internal Medicine. Patients were more likely to receive naloxone if they used a particularly high dose of opioids or had a prior painkiller-related ER visit – such as for overdoses or sedation-caused falls.

Over the next year, patients prescribed just-in-case naloxone had 47 percent fewer painkiller-related ER visits as their counterparts who didn’t get that prescription, Coffin found.

The study doesn’t prove naloxone helped, and there were too few deaths to know if the approach could save lives