MEXICO CITY (Reuters) - While Mexico grapples with relentless drug-related violence, a group of Mexican scientists is working on a vaccine that could reduce addiction to one of the world's most notorious narcotics: heroin.

Researchers at the country's National Institute of Psychiatry say they have successfully tested the vaccine on mice and are preparing to test it on humans.

The vaccine, which has been patented in the United States, works by making the body resistant to the effects of heroin, so users would no longer get a rush of pleasure when they smoke or inject it.

"It would be a vaccine for people who are serious addicts, who have not had success with other treatments and decide to use this application to get away from drugs," the institute's director Maria Elena Medina said Thursday.

Scientists worldwide have been searching for drug addiction vaccines for several years, but none have yet been fully developed and released on the market.

One group at the U.S. National Institute on Drug Abuse has reported significant progress in a vaccine for cocaine.

However, the Mexican scientists appear to be close to making a breakthrough on a heroin vaccine and have received funds from the U.S. institute as well as the Mexican government.

During the tests, mice were given access to deposits of heroin over an extended period of time. Those given the vaccine showed a huge drop in heroin consumption, giving the institute hope that it could also work on people, Medina said.

Kim Janda, a scientist working on his own narcotics vaccines at the Scripps Research Institute in La Jolla, California, said that based on some earlier research papers he had read, the Mexican vaccine could function but with some shortcomings.

"It could be reasonably effective but maybe too general and affect too many different types of opioids as well as heroin," Janda said.

Mexico, a major drug producing and transit country for drugs smuggled into the United States, has a growing drug addiction problem. Health Secretary Jose Cordoba recently said the country now has some 450,000 hard drug addicts, particularly along the trafficking corridors of the U.S. border.

Mexican gangsters grow opium poppies in the Sierra Madre mountains and convert them into heroin known as Black Tar and Mexican Mud, which are smuggled over the Rio Grande.

Every year, the heroin trade provides billions of dollars to gangs like the Sinaloa Cartel and the Zetas. Since 2006, cartel violence has claimed the lives of over 47,000 people in Mexico.

(Additional reporting by Jorge Lebrija; Editing by Anthony Boadle)