The HPV vaccine, which prevents cervical cancer and other malignancies, is now approved for men and women from 27 to 45-years-old, the Food and Drug Administration said on Friday.

The vaccine is Gardasil 9, made by Merck, and had been previously approved for minors and people up to age 26.

It works against the human papillomavirus, HPV, which can also cause genital warts and cancers of the vulva, anus, penis and parts of the throat. The virus has many strains. It is sexually transmitted, and most adults encounter at least one strain at some point in their lives. The vaccine protects against nine strains, including those most likely to cause cancers and genital warts.

“Today’s approval represents an important opportunity to help prevent HPV-related diseases and cancers in a broader age range,” Dr. Peter Marks, director of the F.D.A.’s Center for Biologics Evaluation and Research, said in a statement.