Anal cancer is a leading neoplasia in HIV-infected MSM.We aimed to identify in MSM a set of anal-associated bacterial biomarkers for the diagnosis of biopsy-proven HSIL (bHSIL). Cross-sectional prospective study performed in HIV+ and HIV- MSM referred to a high-resolution anoscopy clinic. The primary outcome was the presence of bHSIL at the inclusion or during the previous year. We analyzed fecal and mucosal microbiota to search for biomarkers predictive of the presence of bHSIL.We found anal-associated bacteria indicative of higher risk of precancerous anal lesions, which combination was highly specific. The microbiota could be exploited as a complementary diagnostic tool to anal cytology to overcome the low specificity and high rate of false positive results of the current screening strategy for anal cancer screening.