The impact of a multicomponent intervention programme on the sexual health of adolescents was assessed in rural Tanzania. A community-randomized trial. Twenty communities were randomly allocated to receive either a specially designed programme of interventions (intervention group) or standard activities (comparison group). The intervention had four components: community activities; teacher-led, peer-assisted sexual health education in years 5-7 of primary school; training and supervision of health workers to provide 'youth-friendly' sexual health services; and peer condom social marketing. Impacts on HIV incidence, herpes simplex virus 2 (HSV2) and other sexual health outcomes were evaluated over approximately 3 years in 9645 adolescents recruited in late 1998 before entering years 5, 6 or 7 of primary school. The intervention had a significant impact on knowledge and reported attitudes, reported sexually transmitted infection symptoms, and several behavioural outcomes. Only five HIV seroconversions occurred in boys, whereas in girls the adjusted rate ratio (intervention versus comparison) was 0.75 [95% confidence interval (CI) 0.34, 1.66]. Overall HSV2 prevalences at follow-up were 11.9% in male and 21.1% in female participants, with adjusted prevalence ratios of 0.92 (CI 0.69, 1.22) and 1.05 (CI 0.83, 1.32), respectively. There was no consistent beneficial or adverse impact on other biological outcomes. The beneficial impact on knowledge and reported attitudes was confirmed by results of a school examination in a separate group of students in mid-2002. The intervention substantially improved knowledge, reported attitudes and some reported sexual behaviours, especially in boys, but had no consistent impact on biological outcomes within the 3-year trial period.