A real-time LightCycler PCR (LC-PCR) with hybridization probes for detection of Mycoplasma genitalium in endocervical and first void urine specimens was developed and compared to a conventional PCR. The primers for both assays were identical and designed to amplify a 427 bp fragment of the 16S rRNA gene of M. genitalium. The LC-PCR assay had a detection limit of < 5 bacterial genomes per reaction when dilutions of genomic DNA from a type strain of M. genitalium were tested. First void urine from 398 men and first void urine and endocervical specimens from 301 women attending an STD clinic were analysed by LC-PCR and by the conventional PCR. Using the conventional PCR as reference, the LC-PCR had a specificity of 99.7 % and a sensitivity of 72.2 % for the detection of M. genitalium in first void urine samples from men. There was no significant difference in the performance of the LC-PCR assay compared to the conventional PCR when endocervical swabs were considered (58 and 65 %, respectively) or with a set of endocervical swab/urine specimens for which the LC-PCR assay detected 73 % of the infections (specificity = 98.6 % and sensitivity = 68.2 %) while the conventional PCR detected 85 % of the infections. With female urine specimens there was a significant difference between the two assays (38 and 73 %, respectively; P = 0.01 McNemar's test). This illustrates the need to analyse both endocervical and urine specimens, because M. genitalium DNA was detected in only one of the two specimens in a great number of the M. genitalium-infected women. The lower sensitivity of the LC-PCR assay was probably caused by a combination of inhibition and limitations regarding the amount of template DNA. The LC-PCR assay was easy to perform and the simultaneous amplification and detection eliminated the need for further handling of PCR products. With improvement in sample preparation methods and increased volumes of the template DNA, the LC-PCR assay could be a useful routine diagnostic method.