Background Obsessive-compulsive disorder (OCD) is a disorder that appears to be underdiagnosed and undertreated, despite the evidence for effective treatments. There are variable estimates of OCD prevalence in the under-16s and published rates give little indication of age trends. Aims To establish the prevalence and associates of OCD in young people aged 5-15 years. Method A nationwide (UK) epidemiological study of rates of psychiatric disorder in 5-to 15-year-olds (1999 British Child Mental Health Survey): 10 438 children were assessed. Results Twenty-five children with OCD were identified (weighted overall prevalence 0.25%; 95% CI 0.14-0.35), with prevalence rising exponentially with increasing age. Compared with normal controls, children with OCD were more likely to be from lower socio-economic class and of lower intelligence. Only three of these children had been seen by specialist children's services. Conclusions Although OCD is rare in young children, the rate increases towards the adult rates at puberty. Children with OCD have additional psychosocial disadvantage. The majority of the childhood cases identified in this survey appear to have been undetected and untreated.