To examine the factors associated with condom use among a cohort of sexually active intravenous drug users (IVDU). Data were collected via personal interview at the fourth-month assessment point of a longitudinal study monitoring HIV infection and risk behaviors among IVDU. A community-based methadone clinic. A total of 158 sexually active heterosexual male and female IVDU, including both methadone patients and out-of-treatment individuals with a history of opiate abuse. We describe a new approach to identify the determinants of condom use. Previous studies have described subjects as either 'condom users' or 'condom non-users', using an individual's overall behavior as the unit of analysis. By analyzing condom use during the most recent sexual encounter, we avoided the problem of interpreting inconsistent condom use. Data were analyzed using forward stepwise logistic regression. Thirty-four per cent of the heterosexual subjects (n = 160) reported using a condom during their last sexual encounter. Being HIV-positive and having either a causal or commercial partner were each associated with increased probability of using a condom (odds ratio, 10.6, 4.4 and 12.1, respectively). No interactions with sex were found. Our results suggest that knowing that one is HIV-positive is an important determinant of condom use; HIV testing may therefore increase the use of condoms. In addition, interventions to change sexual behaviors may need to focus on the type of sexual partner.