Objective. To examine the relationship between depressive disorders and unprotected anal intercourse with casual partners, among homosexually active men attending for primary care. Methods. The first 460 homosexually active men enrolling in an Australian integrated primary care programme were screened for current depressive disorders using the Primary Care Evaluation of Mental Disorders (PRIME-MD) and completed questionnaires on their sexual behaviour in the prior 6 months. One hundred and sixty-two (35%) were HIV positive, 283 (62%) were HIV negative and 15 (3%) were untested. Results. The prevalence of major depressive episode (MDE), as measured by the PRIME-MD, on enrolment was 28% (129/460), while the prevalence of dysthymic disorder (DD) was 26% (121/460). These, include 84 men (18%) who met the criteria for both disorders ('double depression'). Neither disorder was associated with HIV status. Men with MDE were less likely to have been sexually active than the remainder of the cohort (90/129 [70%] vs. 291/331 [88%]; OR: 0.32 [95% CI: 0.19-0.52]; P< 0.0001). Men with DD alone, however, were significantly more likely than men with neither disorder to report having had unprotected anal intercourse with a casual partner (11/38 [29%] vs. 43/292 [15%]; OR: 2.36 [95% CI: 1.09-5.10]; P = 0.035). Conclusions. Depressive disorders were highly prevalent in this cohort and independent of HIV status. MDE was associated with reduced sexual activity. Among men without MDE, the presence of DD was independently associated with an increased likelihood of reporting unsafe anal sex with a casual partner in the prior 6 months.