Squamous cell carcinoma of anus (SCCA) is one of the most frequent non-AIDS-defining diseases in HIV patients, mainly in men who have sex with men (MSM), and it is associated with human papillomavirus (HPV) infection.To determine the prevalence of high-risk HPV (HR-HPV) genotypes, premalignant lesions (HSIL) and SCCA in a cohort of HIV-positive MSM; to study the distribution of HPV genotypes according to anal histology results; and to analyze risk factors for this infection.This prospective single-center study was conducted between May 2010 and September 2016. At the study visit, cotton swabs were used to collect anal samples for cytology study in ThinPrep Pap Test liquid medium (Thin Prep Processor 2000, Hologic Corp, USA), and for HPV PCR (Linear Array HPV Genotyping Test). After, high-resolution anoscopy (HRA) (Zeiss 150 fc) was carried out. Logistic regression analysis was performed to identify risk factors for HR-HPV infection.The study included 319 patients, with mean age of 36.7 years; HR-HPV was detected in 81.3%. The prevalence of HSIL was 13.5% and SCCA was 0.3%. With regard to the distribution of HPV genotypes according to histology results, HPV 16 was the most frequent genotype in normal anal mucosa (26.7%), in LSILs (36.9%), and in HSILs (38%). In multivariate analysis, CD4 nadir < 200 cells/μL was the factor associated with infection by HR-HPV (OR 3.66, 95% CI 1.05%-12.75%).HIV-positive MSM showed a high prevalence of HSIL+ lesions and of infection by oncogenic HPV, which appears to be favored by a deficient immune system. HPV 16 was the most frequently isolated genotype in anal mucosa, regardless of lesion type.