The aim of the present study was to assess the prevalence as well as the possible risk factors of HIV, hepatitis B and hepatitis C, in 194 male prisoners who had been convicted for rape (n=105) or child molestation (n=89). HBsAg, HBeAg, anti-HBc, anti-HBs, anti-HCV and anti-HIV-1/2 were tested for. The participants also completed a standard sociodemographic questionnaire, indicating possible risk factors, the Barratt Impulsiveness Scale, and the life-time history of aggression. Anti-HIV antibodies were not found in any of the prisoners. HBsAg was found in 25 (13%), anti-HBc in 94 (49%), anti-HBs in 40 (21%) and anti-HCV in 13 (6·5%) subjects. Logistic regression analysis showed that anti-HCV positivity was associated with intravenous drug use (OR 20·7, 95% CI 1·1–4·9, P<0·001), while HBsAg positivity was associated separately with being foreign (OR 4·0, 95% CI 0·2–2·5, P<0·01), as well as with impulsiveness score (OR 1·06, 95% CI 0·01–0·11, P<0·02). The prevalence of HBV and HCV infection in this sex offender sample was highly increased in relation to the general population. Since it has been proved that sex offenders are a high-risk group for reoffending, monitoring their health is a necessary step towards prevention of sexually transmitted diseases being spread.