With a straightforward chemical tweak, the addictive—and often deadly—opioid painkiller, fentanyl, may transform into a safe, non-addictive, targeted therapy. Researchers reported this on Thursday in Science.

In rats, a chemically modified form of the opioid could only work on inflamed, hurting tissue—not the rest of the body. Plus, it wasn’t deadly at high doses, like the original, and it didn’t spur addiction-forming behavior in the rodents, researchers at Freie Universität Berlin reported.

“This yielded a novel opioid analgesic [pain reliever] of similar efficacy to conventional fentanyl, however, devoid of detrimental side effects,” the authors concluded.

If it's one of the rare drugs that makes it through further testing and clinical trials—which even in the best of circumstances would takes years—it could be highly useful. The U.S. is now gripped by an epidemic of opioid addiction and overdoses. The Centers for Disease Control and Prevention estimates that 91 people a day die of an opioid overdose. Coroners have had trouble keeping pace with the death toll

As such, researchers have been scrambling to develop alternative treatments. In the new study, researchers use an interesting trick that might come in handy even if the modified drug doesn’t.

For their chemical makeover, the researchers noted that when tissue is damaged and hurting, it becomes inflamed and more acidic. The pH drops from approximately 7.4—what’s seen in normal, healthy tissue—to between 5 and 7. Fentanyl can work regardless of the pH, so it’s active throughout the nervous system no matter what. But, if it was altered to only work at the lower pH, then it could target just the pain source at the peripheral nerves, the researchers hypothesized. And with no activity in the central nervous system, it would dodge opioid’s serious side-effects, including addiction and systemic responses that can be lethal during overdoses.

Using computer simulations, the researcher figured out how modify fentanyl so that it only worked in more acidic conditions. The resulting molecule is (±)-N-(3-fluoro-1-phenethylpiperidin-4-yl)-N-phenyl propionamide, or NFEPP for short. NFEPP has an added fluorine, which attracts protons and allows the drug to become active only in low pH.

In experiments with human cells, the researchers found that NFEPP could still activate the classic μ-opioid receptor in the nervous system—but only at low pH.

In experiments in rats with foot injuries, the drug dampened pain responses in just the foot that was injured. In rats given fentanyl, pain responses were dampened in all feet. Next, rats on either fentanyl or NFEPP, were given a drug that blocks opioids but can’t cross the blood-brain barrier. In rats on fentanyl, the opioid blocker partially reversed the pain-relieving effects of fentanyl—which makes sense because fentanyl can target opioid receptors in the brain. But, in rats given NFEPP, the opioid blocker totally reversed pain relief. This suggests that NFEPP’s effects weren’t due to any activity in the brain, rather they were due only to activity at the site of the injury.

In further experiments, the researchers noted that, unlike fentanyl, high doses of NFEPP weren’t lethal to the rats. And rats on the NFEPP didn’t display impaired motor activity or reward-seeking behavior linked to addiction.

Science, 2017. DOI: 10.1126/science.aai8636 (About DOIs).

This post has been updated to clarify the structure of NFEPP.