BACKGROUND:HIV prevalence among people who inject drugs (PWID) in Ukraine is among the highest in the world. In this study, we aimed to assess whether a social network intervention was superior to HIV testing and counselling in affecting HIV incidence among PWID. Although this was not the primary aim of the study, it is associated with reducing drug and sex risk behaviours, which were primary aims. METHODS:In this clustered randomised trial, PWID who were 16 years of age or older, had used self-reported drug injection in the past 30 days, were willing to be interviewed for about 1 hour and tested for HIV, were not too impaired to comprehend and provide informed consent, and, for this paper, who tested HIV negative at baseline were recruited from the streets by project outreach workers in three cities in southern and eastern Ukraine: Odessa, Donetsk, and Nikolayev. Index or peer leaders, along with two of their network members, were randomly assigned (1:1) by the study statistician to the testing and counselling block (control group) or the testing and counselling plus a social network intervention block (intervention group). No stratification or minimisation was done. Participants in the network intervention received five sessions to train their network members in risk reduction. Those participants assigned to the control group received no further intervention after counselling. The main outcome of this study was HIV seroconversion in the intent-to-treat population as estimated with Cox regression and incorporating a γ frailty term to account for clustering. This trial is registered with ClinicalTrial.gov, number NCT01159704. FINDINGS:Between July 12, 2010, and Nov 23, 2012, 2304 PWIDs were recruited, 1200 of whom were HIV negative and are included in the present study. 589 index or peer leaders were randomly assigned to the control group and 611 were assigned to the intervention group. Of the 1200 HIV-negative participants, 1085 (90%) were retained at 12 months. In 553·0 person-years in the intervention group, 102 participants had seroconversion (incidence density 18·45 per 100 person-years; 95% CI 14·87-22·03); in 497·1 person-years in the control group 158 participants seroconverted (31·78 per 100 person-years; 26·83-36·74). This corresponded to a reduced hazard in the intervention group (hazard ratio 0·53, 95% CI 0·38-0·76, p=0·0003). No study-related adverse events were reported. INTERPRETATION:These data provide strong support for integrating peer education into comprehensive HIV prevention programmes for PWID and suggest the value in developing and testing peer-led interventions to improve access and adherence to pre-exposure prophylaxis and antiretroviral therapy. FUNDING:The National Institute on Drug Abuse.