OBJECTIVE: To date, the epidemic of HIV infection in Scotland has been primarily associated with injecting drug use. However, the epidemiology of HIV in Scotland changed in the late 1980s, with homosexual men becoming the largest group at risk of HIV infection and AIDS. Our aim was to describe homosexual men's sexual risk behaviours for HIV infection in a sample of men in Scotland's two largest cities. DESIGN/SETTING: Trained sessional research staff administered a short self completed questionnaire, to homosexual men present in all of Glasgow's and Edinburgh's "gay bars," during a 1 month period. SUBJECTS: A total of 2276 homosexual men participated, with a response rate of 78.5%. Of these, 1245 were contacted in Glasgow and 1031 in Edinburgh. MAIN OUTCOME MEASURES: Sociodemographic data, recent (past year) sexual behaviour, information on last occasion of anal intercourse with and without condoms, and sexual health service use. RESULTS: Anal intercourse is a common behaviour; 75% of men have had anal intercourse in the past year. A third of our sample report anal intercourse with one partner in the past year, but 42% have had anal intercourse with multiple partners. Over two thirds of the total population have not had any unprotected anal intercourse (UAI) in the past year and a quarter of the sample have had UAI with one partner only. 8% report UAI with two or more partners. More men in Edinburgh (17% v 10%) reported unprotected sex with casual partners only, but more men in Glasgow (29% v 20%) reported UAI with both casual and regular partners (chi 2 = 12.183 p < 0.02). Multiple logistical regression found that odds of UAI are 30% lower for men with degree level education and 40% lower for men who claim to know their own HIV status, whereas they are 40% higher for those who have been tested for HIV and 48% higher for infrequent visitors to the "gay scene". Men who have had an STI in the past year are 2.4 times more likely to report UAI than those who have not. Men with a regular partner were significantly more likely to report UAI, as were those who had known their partner for longer, and who claimed to know their partner's antibody status. CONCLUSION: On the basis of current sexual risk taking, the epidemic of HIV among homosexual men in Scotland will continue in future years. The data reported here will prove useful both for surveillance of sexual risk taking, and the effectiveness of Scotland-wide and UK-wide HIV prevention efforts among homosexual men.