A new study by a team of researchers in California shows it is possible to vaccinate laboratory animals against the effects of heroin.

The vaccine not only blunted the pain-killing action of heroin, but it also prevented rats from becoming addicted to the drug. Significantly, however, it didn’t keep the animals from gaining pain relief from many other opiates, suggesting the vaccine targets just heroin and a few related compounds.

The experiments at the Scripps Research Institute in La Jolla is the latest effort to bring the power of the immune system to bear against addictive substances.

The original lab experiments of a heroin vaccine were published in 1974. Since then, scientists have developed vaccines against nicotine, cocaine and amphetamines. Although both nicotine and cocaine vaccines have gone as far as human tests, none have been licensed for commercial use.

This month Nabi Biopharmaceuticals of Rockville reported that a nicotine vaccine it is developing failed to help smokers quit smoking in a clinical trial involving 1,000 people. A second trial is underway.

The vaccines work by stimulating the immune system to make antibodies against the addictive compounds. The antibodies bind those compounds in the bloodstream and prevent them from entering the brain, where they exert their euphoric and addictive effects.

In the case of heroin, the task is especially difficult because soon after the drug enters the body it rapidly changes — or is “metabolized” — into two other compounds that also are addictive. They are 6-acetylmorphine (6AM) and morphine. A useful vaccine would need to target all three compounds.

The vaccine fashioned by Kim D. Janda, a chemist at Scripps, and his colleagues consists of a carrier protein that is attached to a heroin molecule on the side opposite from where the metabolism occurs. They then add a salt-like substance that sticks to the vaccine and slows down the metabolism.

“Our vaccine goes through a dynamic process where it slowly changes in form from heroin to 6AM to morphine,” Janda said. “The immune system recognizes each of those molecules.” The result is antibodies against each molecule — “three columns of troops,” in Janda’s words.

Rats given the vaccine did not experience the pain-blunting effects of heroin when their paws were exposed to a hot surface or a sharp object. They also didn’t learn to push a lever to give themselves heroin through a permanently implanted intravenous line. However, they did get pain relief from oxycodone, an opiate commonly used in medicine, suggesting that the vaccine neutralizes heroin, 6AM and morphine specifically.

The experiments are reported in the current edition of the Journal of Medicinal Chemistry. The next task is to see whether the vaccine prevents relapse in previously addicted, and then detoxified, rats.

Paul R. Pentel, a physician at the University of Minnesota who is working on a different heroin vaccine, called Janda’s “a very creative strategy.” He said he was “delighted to have the competition” from the Scripps group.

Any vaccine that might work as an adjunct to drug rehabilitation would need to be boosted several times a year and could probably be overpowered by taking high doses of the abused substance. It would not be a cure-all.

Unlike vaccine candidates for some other abused substances, neither Janda’s nor Pentel’s heroin vaccines have been patented.

“There is a market for a nicotine vaccine, but there’s no market for this stuff,” said Janda, 54, who has worked in the field for 25 years. “Most cocaine and heroin addicts aren’t CEOs and insurance companies don’t cover them. But there’s clearly a need for this. The billions of dollars spent on wasted lives, theft, destruction, AIDS — it’s hard to measure.”

Pentel, 62, basically concurred.

“Our lab is focused on showing ‘proof of principle,’ ” he said. “We’re very happy if others can take these ideas and use them productively.”