OBJECTIVE: To investigate the pathway by which the human immunodeficiency virus (HIV) is entering populations of injecting drug users (IDUs) in Victoria. DESIGN: A retrospective case-control study comparing the prevalence of self reported risk behaviour in HIV-infected and uninfected Victorian IDUs. SETTING: Subjects were recruited by trained peer outreach workers from their personal networks, community agencies and Fairfield Hospital outpatients, and by a research worker from the major metropolitan prison. PARTICIPANTS: People who had been resident in Victoria for the past 12 months and had injected an illicit drug more than once in the previous three years were eligible to participate. Sixty-two such people (28 HIV-infected, 34 not infected) were included in the study. MAIN OUTCOME MEASURES: The two main hypothesised portals of entry were from the non-IDU homosexual population in Victoria, and from HIV-infected IDUs elsewhere. RESULTS: male homosexual contact was the most consistent risk factor identified by this study (odds ratio [OR], 6.2; 95% confidence interval [CI], 1.7-23.8). Having lived in or visited Sydney before 1986 was also associated with being infected with HIV (OR, 13.2; 95% CI, 1.5-603), and this was associated with homosexuality. Infected IDUs reported more sharing of injecting equipment than controls (OR, 9.0; 95% CI, 1.5-92.5), particularly with sexual partners; when this was the case, they were more likely to always use the injecting equipment after their partner (61% of cases, 0% of controls; OR, greater than or equal to 4.1; P = 0.0006). CONCLUSION: Men who have a history of both homosexual contact and injecting drug use represent the group of IDUs at highest risk of HIV infection in Victoria. Although heterosexual and homosexual IDUs may have limited contact only, a larger epidemic of HIV infection in heterosexual IDUs could spread from homosexual IDUs through the sharing of injecting equipment.