Adequate thyroid hormone availability during pregnancy is necessary for optimal fetal brain development. During the first 18-20 weeks of gestation, fetal thyroid hormone availability largely depends on the placental transfer of maternal thyroxine. Although various studies have shown that maternal thyroid dysfunction is associated with suboptimal child neurodevelopmental outcomes, the most vulnerable time window remains to be identified. The aim of this study is to examine the association of maternal thyroid function with child brain morphology and to study whether any association depends on the timing of thyroid assessment. This prospective cohort study was part of the Generation R Study in Rotterdam, Netherlands, with a prospective population-based birth cohort. Pregnant women living in Rotterdam with an expected delivery date between April 1, 2002, and Jan 1, 2006, were eligible. Other inclusion criteria were maternal serum thyroid-stimulating hormone (TSH) and free thyroxine (FT4) measurement in early or mid-pregnancy (≤18 weeks) and available brain MRI data for child at age 10 years. Exclusion criteria were pre-existing thyroid disorder, thyroid disorder treatment, twin pregnancy, in-vitro fertilisation-induced pregnancy, and suboptimal-quality MRI data or major incidental finding on MRI. The main outcome was the association between maternal TSH and FT4 concentrations with brain MRI outcomes of children. Regression analyses accounted for gestational age at blood sampling, maternal age, ethnicity, education level, smoking, thyroid peroxidase antibody positivity, child sex, age at MRI, and total intracranial volume. Effect modification by gestational age at blood sampling was also investigated. Between Dec 1, 2001, and June 30, 2005, 7069 women were enrolled during early or mid-pregnancy (≤18 weeks of gestation), of whom 5088 were not included because they did not have available data on maternal serum TSH or FT4 concentrations (n=1175), their child did not have brain MRI done (n=3377), or they met exclusion criteria (n=536). Thus, 1981 mother-child pairs were included in the study, with TSH and FT4 concentrations measured during pregnancy at a median of 13·1 weeks of gestation (IQR 12·1-14·5) and offspring brain morphology assessed by MRI at a median age of 9·9 years (9·7-10·2). Maternal TSH had an inverted U-shaped association with offspring total grey matter volume (p=0·007) and with cortical grey matter volume (p=0·022). The association of maternal TSH with child total grey matter volume (pinteraction=0·053) and cortical volume (pinteraction=0·086) differed by the duration of gestation. Analyses stratified for gestational age at blood sampling showed an inverted U-shaped association of maternal TSH with child total grey matter volume and cortical grey matter volume, which was most evident at 8 weeks gestation. After about 14 weeks of gestation, TSH was no longer associated with child brain morphology. Maternal FT4 concentrations were not associated with child total grey matter volume after adjusting for total intracranial volume (p=0·75). Here, we show that both low and high maternal thyroid function are associated with smaller child total grey matter and cortical volume. To the best of our knowledge, this study is the first to show that an association with a neurodevelopmental outcome is most evident when maternal thyroid function is measured early in pregnancy. These novel findings suggest that embryonic brain development is particularly vulnerable to altered maternal thyroid function. Netherlands Organisation for Health Research and Development and the Sophia Children's Hospital Foundation.