Abstract Background Poor mental health in childhood and adolescence youth is an important public health challenge. We aimed to examine the prospective association between mental health problems among primary school children and later diagnosed mental disorders and mental health problems in youth. Methods A prospective cohort study of children participating in school health nurse examination during first years of primary school (approx. 6 years) in 17 municipalities in the capital region of Copenhagen, Denmark, with follow-up until their 16th birthday. Baseline data included information from national population registers and school health nurse records. Outcome variables: mental disorders diagnosed at hospital from approx. age 6 until 16 years (N = 6,930) and school health nurse records of mental health problems at approx. age 16 (N = 11,250). Results Problematic relations to peers in early primary school was associated with later neurodevelopmental disorders, including intellectual disability, autism-spectrum disorder and disorders of hyperactivity and inattention (AOR=4.14, 95% CI 2.15-7.97), and poor home related well-being in youth (AOR=1.67, 95% CI 1.02-2.74). Poor school well-being in early primary school was associated with poor school well-being ten years later (AOR=1.67, 95% CI 1.19-2.34) as well as problematic relations to peers (AOR=1.83, 95% CI 1.08-3.10). Further poor general well-being in early primary school was associated with problematic relations to peers in youth (AOR=2.21, 95% CI 1.17-4.18). Conclusions School health nurses identify a group of children in the early years of primary school with mental health problems and an increased risk of later mental health problems and disorders, and therefore they play an important role in the early identification of children at risk. Key messages • Children with problematic relations to peers have up to a fourfold increased risk of later mental disorders. • The school health nurses play an important role in the early identification of children at risk of later mental health problems.