Objectives: To establish the prevalence of HIV, syphilis, and sexual risk behaviour among three groups of men who have sex with men in Jakarta, Indonesia, and to investigate sexual links between these men and broader heterosexual populations. Methods: Anonymous, cross sectional surveys among community recruited transgender and male sex workers and self recognised men who have sex with men (MSM) were undertaken in mid-2002 in Jakarta, Indonesia. Places where transgender and male sex workers sell sex and where men go to meet non-commercial male sex partners were mapped. Probability samples were selected for the sex worker populations, while a mixed probability and convenience sample was drawn for self recognised MSM. Blood was drawn for HIV and syphilis serology and community interviewers administered a standardised questionnaire. Results: HIV prevalence was 22% among transgender sex workers, 3.6% among male sex workers, and 2.5% among self recognised MSM, and syphilis prevalence was 19.3%, 2.0% and 1.1% respectively. 59.3% of transgender sex workers and 64.8% of male sex workers reported recent unprotected anal intercourse with clients, and 53.1% of other MSM reported unprotected anal sex with male partners. Some 54.4% of male sex workers and 18.3% of other MSM reported female partners in the preceding year. Conclusion: HIV has reached substantial levels among transgender sex workers, and is not negligible in other MSM groups. Risk behaviour is high in all subpopulations, and bisexual behaviour is common, meaning the threat of a wider epidemic is substantial. Prevention programmes targeting male-male sex are needed to reduce this threat.