The two major risk groups for acquisition of HIV in the UK are gay men and IDUs. Individuals from these risk groups vary in a number of respects in their life-style, which have the potential to affect the course of their HIV disease. This study compares gay men and IDUs from the Lothian Region of Scotland with respect to their AIDS defining diagnosis and subsequent CDC (Centers for Disease Control) stage IV events. Comparisons were made between the two risk groups for their AIDS defining diagnosis by performing chi square tests, Mann-Whitney tests and logistic regression. Subsequent CDC stage IV events were analysed using ordinal logistic regression and Cox regression. 89 IDUs and 56 gay men were included in the analysis. Oesophageal candida was a commoner AIDS-defining diagnosis in IDUs than gay men and Kaposi's sarcoma was diagnosed more frequently in gay men than IDUs. Subsequently oesophageal candida was also commoner in IDUs and CMV retinitis was seen more frequently in gay men. The role of prophylaxis and differences in diet are discussed as possible causes of the observed differences in the incidence of oesophageal candida. The higher incidence of CMV retinitis in gay men probably reflects the high level of sexual acquisition of CMV.