BACKGROUND: We examined a range of common bacterial and viral sexually transmitted infections as risk factors for HIV seroconversion in a community-based cohort of HIV-negative homosexual men in Sydney, Australia. METHODS: Detailed information about HIV risk behaviors was collected by interview twice yearly. Participants were tested annually for HIV, anal and urethral gonorrhea and chlamydia, herpes simplex virus types 1 and 2, and syphilis. In addition, they reported annual diagnoses of these conditions and of genital and anal warts. RESULTS: Among 1427 enrolled participants, 53 HIV seroconverters were identified, giving an incidence of 0.78 per 100 person-years. After controlling for number of episodes of insertive and receptive nonseroconcordant unprotected anal intercourse, there were independent associations with anal gonorrhea (adjusted hazard ratio = 7.12, 95% confidence interval: 2.05 to 24.79) and anal warts (hazard ratio = 3.63, 95% confidence interval: 1.62 to 8.14). CONCLUSIONS: Anal gonorrhea and anal warts were independently associated with HIV acquisition. The added HIV prevention value of more frequent screening of the anus to allow early detection and treatment of anal sexually transmitted infections in homosexual men should be considered.