Dozens of types of human papillomavirus (HPV) can live in the human genital tract, and having one or more of them increased women’s risk of acquiring HIV by two and a half times, according to study findings published in the journal AIDS.

The results come from an analysis of Pap smears from HIV-negative women who participated in an international clinical trial of an HIV prevention gel. The 138 women who acquired HIV had a median age of 23. They were each matched—based on age, country and whether they had experienced transactional sex—with three women who did not acquire HIV.

In total, 84% of the women who acquired HIV had any strain of HPV; 65% of women who didn’t acquire HIV also had HPV—which makes sense, considering that most sexually active people will be exposed to HPV in their lifetime. High-risk HPV types (those that can cause cervical, genital, anal or oral cancer) were more strongly associated with HIV acquisition than low-risk types. While having any type of HPV was associated with an increased risk for HIV acquisition, having four or more HPV strains was associated with the highest risk—a fourfold increase.

The good news is that if those women had received the Gardasil 9 HPV vaccine, which protects against nine HPV types that can cause cancer or genital warts, it might have prevented 60% of those HIV transmissions.

“This suggests that widespread HPV vaccination may have the potential to reduce HIV risk in a high-burden setting,” wrote Gui Liu, PhD, of the Center for Clinical Research at the University of Washington, and colleagues.