The objective of this study was to compare mental health at 5 years in children born extremely preterm with a reference group, and assess associations between functional abilities and mental health within the preterm group. In a national Norwegian cohort with gestational age 22-27 weeks or birthweight 500-999 g, mental health was assessed with the Strengths and Difficulties Questionnaire (SDQ), cognitive function with the Wechsler Preschool and Primary Scale of Intelligence-Revised (WPPSI-R), motor function with the Movement Assessment Battery for children (ABC-test) and severity of cerebral palsy (CP) with the Gross Motor Function Classification for CP (GMFCS). Neurodevelopmental disabilities (NDD) were described as mild and moderate/severe. SDQ of the preterm children was compared with that of an unselected reference group. SDQ sub-scores ≥90th percentile of the reference group were defined as a mental health problem and a Total Difficulties Score ≥90th percentile (TDS90) as suggestive of psychiatric disorder. Of 361 eligible preterm children, parents completed SDQ for 255 (71%). 97 (38%) had TDS90 compared to 116 (11%) of the reference group (OR 5.1; 95% CI 3.7-7.1). For the preterms, the rate of TDS90 was higher for those with moderate/severe NDD (27/37 vs. 27/116, adjusted OR 8.0; 95% CI 3.2-19, and mild NDD 43/102 [adjusted OR 2.2 (1.2-4.1)]. For preterms with no NDD, TDS90 was more common than for the reference group (27/116 vs. 116/1,089, OR 2.5; 95% CI 1.6-4.1). Extreme prematurity was associated with increased risk of later mental health problems, particularly if they had other functional impairments.