The study, supported by the National Cancer Institute, found that Cervarix, made by GlaxoSmithKline, provided 93 percent protection against infection with the two types of human papillomavirus that cause most of the cancers.

“We were surprised at how big the effect was,” said Dr. Rolando Herrero, head of prevention for the World Health Organization’s International Agency for Research on Cancer, and the study’s lead author. “It’s a very powerful vaccine.”

The study was done with 5,840 women in Costa Rica who were ages 18 to 25 and sexually active when it began. Four years after being vaccinated, each gave a mouthwash gargle sample that picked up cells from deep in the throat. Only one woman who had received the vaccine was infected with the viruses HPV 16 or HPV 18, the cancer-causing types; 15 women who had gotten a placebo vaccine were infected.

Dr. Herrero explained some of the study’s limitations: when it began, it was concerned only with cervical cancer, so no men were enrolled. The women were initially tested to make sure they had no cervical infections, but were not tested for throat or anal infections. They gave oral samples only once, so it was not possible to say how many had persistent infections; most people clear HPV infections on their own, so only a tiny fraction lead to cancer. Four years is not long enough to know how many cancers would develop — but finding out for sure would require waiting 20 years or more, and ethical guidelines require that all women in the trial get regular examinations and that any suspicious lesions be destroyed before they turn cancerous. Also, only Cervarix, and not Merck’s similar Gardasil vaccine, was tested.

However, Dr. Herrero said, men would “probably” get the same protection as the women did, because the vaccine produces identical antibody levels in both sexes.