Using a condom or abstaining from sex are currently the only ways to avoid contracting gonorrhoea, which infects about 80 million people every year, according to the World Health Organization (WHO).
As drug resistance spreads, doctors are diagnosing more and more cases that cannot be treated by antibiotics, making it a major public health concern.
Just last week, the WHO said there was an urgent need for new drugs to prevent and treat gonorrhoea, often called "the clap", which is spread by vaginal, oral and anal sex.
Untreated, it can cause painful pelvic inflammation in women, and infertility in both genders. In extreme cases, the bacteria can spread in the blood to cause life-threatening infections in other parts of the body.
If a pregnant woman is infected, gonorrhoea can cause blindness in her unborn child.
The disease spreads easily because many carriers are unaware of their infection and unwittingly pass it on to new sexual partners.
For the new study, published in The Lancet, researchers looked at diagnosed gonorrhoea cases among people who would have been eligible for a meningococcal B vaccine administered to over a million New Zealanders between 2004 and 2006.
Meningococcal bacteria, spread through coughing or kissing, can cause meningitis, an inflammation of the brain and spinal cord, and a blood infection called septicaemia. Both can be fatal.
While they are vastly different in symptoms and transmission, the meningitis and gonorrhoea bacteria are a very close genetic match, the researchers said.
Experts recently noticed a tantalising decline in gonorrhoea after meningococcal B vaccine campaigns.
So the team set out to investigate, and found that people who got the meningitis vaccine in New Zealand "were significantly less likely to have gonorrhoea" than people who did not get the shot.
The vaccine was estimated to have reduced gonorrhoea cases by 31 percent -- a level that would decrease the prevalence of the disease by about a third within 15 years.
"This is the first time a vaccine has shown any protection against gonorrhoea," said study co-author Helen Petousis-Harris of the University of Auckland in New Zealand.
How the immune system is triggered for gonorrhoea is not understood, and the vaccine, used in a specific outbreak, is no longer available.
Some of the same molecules were used, however, to manufacture another meningococcal vaccine that is still in use.
Further study is crucial to determine how the meningitis shot blocked gonorrhoea, Kate Seib of the Institute for Glycomics at Australia's Griffith University wrote in a comment on the study.
"In light of the high burden of disease and the threat of gonorrhoea becoming untreatable because of antibiotic resistance, there is an increased imperative to revisit vaccine options and reinvigorate research in this field."