Objectives: To determine the prevalence of rectal and urethral Mycoplasma genitalium (MG) in men who have sex with men (MSM) attending a genitourinary medicine clinic and to measure its associations with symptoms, clinical signs, sexual behaviour and concomitant sexually transmitted infections (STI). Methods: MSM attending for STI screening were tested for MG using a real-time PCR assay that targets the MgPa gene. Data were collected on demographics, sexual behaviour, past STI history and clinical symptoms and signs. Results: 849 first-void urine and rectal specimens were collected from 438 MSM. The overall prevalence of MG in MSM was 6.6% with first-void urine positivity of 2.7% and rectal positivity of 4.4%. MG was significantly associated with HIV positivity (OR 7.6, 95% CI 3.2 to 18.7, p<0.001) in contrast to Chlamydia trachomatis (OR 1.5, 95% CI 0.5 to 4.1, p=0.4) and Neisseria gonorrhoeae (OR 1.7, 95% CI 0.7 to 3.8, p=0.194). MG was more prevalent than C trachomatis (p=0.15) and N gonorrhoeae (p=0.02) in this subgroup of HIV-positive MSM. Urethral infection was associated with dysuria (p<0.001) but there was no association between rectal infection and anorectal symptoms or signs. Conclusion: Rates of MG are much higher in HIV-positive MSM than HIV-negative MSM at both urethral and rectal sites, and MG is more prevalent in HIV-positive MSM than other bacterial STI. Although the subclinical nature of MG in the rectum questions its significance, the high prevalence seen at this site could be a potential source of onward urethral transmission. Future work should assess the need for appropriate screening and treatment of MG infection in MSM, particularly those with HIV infection and high-risk sexual behaviour.