Objectives: To investigate the role of melatonin in the emergence of mental capacities in the newborn infant. Study design: Assessment of Preterm Infant Behavior examination was performed at 2 weeks post-term age for 39 (21 preterm and 18 term) infants. 6-Suphatoxymelatonin from nocturnal urine samples was analyzed by enzyme-linked immunosorbent assays, and the Mental Developmental Index, assessed by Bayley scales, was correlated at 4, 6, and 9 months' corrected age. Results: Multivariate analysis of variance with repeated measures showed that improved autonomic function at 2 weeks of age was associated with higher Mental Developmental Index scores at 9 months when related to the amount of melatonin at 4, 6, and 9 months of age. Conclusions: Early compromised autonomic system function in preterm infants is associated with lower mental capacities and is related to lower melatonin levels at later ages.