Every time heroin addicts shoot up, they’re taking their lives in their hands. That’s not just because heroin itself is dangerous; increasingly, the drug is combined with fentanyl, a synthetic drug often used in conjunction with anesthesia.

Fentanyl is up to 50 times more potent than heroin, which also makes it more lethal—the drug is fueling a public health crisis in New Orleans and has caused thousands of overdoses in Chicago, New England, and Canada. For those that try to quit the habit, the path to recovery is littered with failure; studies have shown 40 to 60 percent of people seeking treatment for drug addiction relapse, often within the first year.

But what if a recovering addict could physically no longer get high? A treatment that makes an addict immune to a drug’s effects would decrease the motivation to seek the drug.

That could be possible with drug vaccines, treatments that train the immune system to attack drug molecules before they affect the brain. Scientists have been experimenting with vaccines for various drugs for years; last month, researchers published a study about an experimental fentanyl vaccine, the first of its kind. And while vaccines can’t be the only treatment for the opioid epidemic, they might be one of the few options that can truly help addicts recover—if the vaccines can make it to the clinic.

“The idea that [the researchers] can make an effective vaccine is very cool. It’s a good accomplishment,” says Phil Skolnick, director of the Division of Pharmacotherapies and Medical Consequences of Drug Abuse at the National Institute on Drug Abuse (NIDA).

After a person injects, eats, smokes, or snorts a drug, drug molecules enter the bloodstream and eventually make their way to the brain where they bind to particular receptors on the surface of neurons. A drug vaccine would stop that process—the immune system would attack those molecules while they’re still in the blood. But the immune system doesn’t naturally assume that the molecules are invaders that need to be attacked, so it needs to be trained.

“You have to trick the body, and it requires a fair amount of trickery,” Skolnick says. In practice, that means binding molecules with a similar structure to those of the drug in question with antigens, molecules that trigger an immune response. Over time, the immune system would learn to attack drug molecules. Most vaccines so far have targeted a single compound, but it could be possible to have a polyvalent vaccine that can address several at once.

Scientists were able to demonstrate a working vaccine recently in mice. Over the course of several weeks, they gave mice a series of booster shots so that their immune systems would attack fentanyl. Then the researchers gave the vaccinated mice a lethal dose of the drug. Not only did the mice survive, they didn’t demonstrate any “high” behavior like ignoring pain. Skolnick, who wasn’t involved in the study, called it “good science” and “a great scientific accomplishment.”

The idea of drug vaccines has been around since the 1970s, says Kim Janda, a chemist at the Scripps Research Institute and an author of the fentanyl study, but it became eclipsed by other treatments like methadone. Then, starting in the mid-1990s, scientists, including Janda, started studying vaccines for cocaine that brought the concept back into fashion.

If scientists have been working on drug vaccines for so long, why aren’t any available? Part of the reason, Janda says, is that past vaccines simply haven’t worked well enough. The most promising vaccine so far has been one for nicotine addiction, called NicVax, that could help people stop smoking. It went through several rounds of clinical trials but eventually failed because it didn’t help more people quit smoking than a placebo. Janda says there are scientific reasons why NicVax didn’t work, and he’s looking to address them in his own nicotine vaccine.

The other impediment to the development of drug vaccines is that there’s not much money dedicated to it. “The problem is that pharma companies have not been terribly interested in addiction research,” Skolnick says. For the companies and organizations that hold the purse strings, addiction is still considered a “moral failure,” Janda adds, which makes them reluctant to allocate funding to treat it like a neurological disorder.

And though that attitude has started to shift, it hasn’t yet affected organizations’ funding decisions; though last month President Obama requested more than $1 billion from Congress to combat the opioid epidemic, neither Skolnick nor Janda anticipate any of that money going towards drug vaccines.

Even if scientists developed a drug vaccine that was approved by the Food and Drug Administration (FDA), it wouldn’t be a panacea for addiction. It would be unreasonable to expect that a vaccine would work in 100 percent of patients, Janda says. A drug vaccine would require booster shots over the course of several months, and some patients might not get all of them, which would limit its efficacy. It might be expensive.

Plus, in the U.S., addicts could access a number of different drugs if they wanted to get high again—a vaccinated heroin addict could still relapse with morphine or painkillers against which he’s not vaccinated, for example. And even a highly effective vaccine would need to be paired with behavioral therapy to treat the non-physical aspects of addiction, plus another drug to combat craving. “There’s no magic bullet for addiction,” Skolnick says.

Still, drug vaccines are a promising treatment option. Pre-clinical studies like Janda’s show that vaccines can truly decrease the percent of addicts that relapse. With the right formulation and more experiments, they could be a new, creative solution to combat the opioid epidemic.

Janda’s team has also developed a heroin vaccine and is working with a small biotech company called Molecular Express to bring it toward clinical trials. They’re raising money for their research now and plan to test the vaccine in non-human primates through a collaboration with Virginia Commonwealth University. He hopes to start tests in humans in the next two years, and might even look into combining it with the fentanyl vaccine, he says.

“The opioid epidemic is huge. It’s real and it’s not going away,” Janda says. “It’s a very hard addiction to break. I think whatever ways we can look at stopping it is important. And vaccines are one of the ways of looking outside the box.”