Objectives:The associations of long-term risks of the full spectrum of mental disorders with clinically reassuring but suboptimal score range 7–9 remain unclear. This study investigated these associations during up to 38 years of follow-up.Methods:In a nationwide cohort study of 2,213,822 singletons born in Denmark during 1978–2015, we used cox regression to estimate the hazard ratio (HR) of mental disorders with a 95% CI.Results:A total of 3,00,679 (13.6%) individuals were diagnosed with mental disorders. The associations between suboptimal Apgar score 7–9 and mental disorders differed by attained age. In childhood (≤ 18 years), declining Apgar scores were associated with increased risks of overall mental disorders with HRs (95% CI) of 1.13(1.11-1.15), 1.34 (1.27–1.41), and 1.48 (1.31–1.67) for Apgar scores of 7–9, 4–6, and 1–3, respectively, compared with a score of 10. A dose-response association was seen even within the score range from 9 to 7 (HR 1.11 [95% CI: 1.08–1.13], 1.14 [1.10–1.18], and 1.20 [1.14–1.27], respectively). Of note, individuals with scores of 7–9 had increased risks of organic disorders (HR: 1.27, 95% CI: 1.05–1.53), neurotic disorders (HR: 1.07, 95% CI: 1.03–1.11), and a wide range of neurodevelopmental disorders, such as intellectual disability (1.87, 1.76–1.98), childhood autism (1.13, 1.05–1.22) and attention deficit hyperactivity disorder (1.10, 1.06–1.15). In early adulthood (19–39 years), suboptimal Apgar scores 7–9 were not associated with the risks of overall and specific mental disorders.Conclusion:Infants born with clinically reassuring but suboptimal 5-min scores 7–9 are at increased risks of a wide spectrum of mental disorders in childhood.