Background. Injecting drug users (IDU) are at risk of parenterally transmitted diseases such as hepatitis B virus (HBV), hepatitis C virus (HCV), and human immunodeficiency virus (HIV) infection. We investigated whether a history of syringe sharing in prison is a risk factor for these infections. In the longitudinal part of the study, HBV, HCV, and HIV seroincidence rates were determined. Methods. The participants were recruited by multisite-sampling at different agencies for IDU. Data on risk behaviour were obtained by a standardized questionnaire. Serological markers for HBV, HCV, and HIV were determined. Logistic regression analysis was performed to adjust for confounding effects. Results. A history of syringe sharing in prison was significantly associated with HBV (adjusted prevalence odds ratio [POR] = 3.9, 95% confidence interval [CI] : 2-10), HCV (POR = 9.7, 95% CI : 3-33), and HIV infection (POR = 10.4, 95% CI :4-29). The HIV seroincidence rate was 5.9 per 100 person-years. None of the IDU receiving methadone maintenance treatment (MMT) seroconverted whereas the HIV incidence was 8.5 among IDU not in MMT (P = 0.01). Conclusions. The increased risk of HBV, HCV, and HIV infection among IDU who had shared syringes in prison warrants specific preventive action. The longitudinal data suggest that IDU in MMT have a lower risk of HIV infection.