The objective of this study was to evaluate the relation between drinking, drug use, and unprotected anal intercourse in young men who have sex with men. A cross-sectional analysis of first-visit data from a prospective cohort of 508 young gay men recruited from 1993 through 1994 from bars, college campuses, and the Fenway Community Health Center in Boston was performed. The major outcome measures were any unprotected anal intercourse, after drinking and when sober, stratified by type of sexual partner (steady or nonsteady) during the previous 6 months and during the most recent sexual encounter. The average age of the cohort was 23.3 years; 77.6% were white, and 76.4% were in college. These young men had a median of 10.5 male sexual partners in their lifetimes, and 3 sexual partners in the previous 6 months before enrollment. One hundred and thirty-four (26%) reported unprotected anal intercourse during the previous 6 months. Individuals who had unprotected anal intercourse were more likely to have a drinking problem (odds ratio [OR] = 1.95; 95% confidence interval [CI] = 1.26-3.01) and drank more (20.4 ml/day versus 13.9 ml/day; p ≤ 0.01), compared with individuals who did not engage in unprotected anal intercourse. Overall, men were significantly less likely to have unprotected anal intercourse after alcohol or drug use, based on a series of paired analysis (OR = 0.27; 95% CI = 0.15-0.48). However, when we stratified by type of sexual partner, men were significantly more likely to have unprotected anal intercourse with their nonsteady sexual partners after drinking than when sober (OR = 4.33; 95% CI = 1.37-13.7), but were significantly less likely to have unprotected anal intercourse with steady partners (OR = 0.27; 95% CI = 0.15-0.48). The patterns observed as already mentioned for drinking were also found for substance use in general. Men who were more likely to have unprotected anal intercourse after substance use were significantly more likely to have a drinking problem (OR = 7.65; 95% CI = 2.34-24.59). These results suggest that the role of alcohol and unsafe sex in young gay men is complex, with the role of situational factors of paramount importance. Alcohol and substance use interventions designed to reduce HIV risk need to specify the role of substance use in the sexual context to be successful.