The fetal and early infant origins of a number of adult cardiovascular and metabolic diseases have received considerable attention, but the long-term consequences of early environments for human immune function have not been reported. We investigated the effects of pre- and postnatal environments on thymic hormone production in adolescents participating in an ongoing longitudinal study in the Philippines. Prospective data collected at birth, during y 1 of life, in childhood and in adolescence were used to predict plasma thymopoietin concentration in 14- to 15-y-old adolescents (n = 103). Thymopoietin concentration was compared for small-for-gestational-age and appropriate-for-gestational-age individuals while controlling for a range of postnatal exposures. Prenatal undernutrition was significantly associated with reduced thymopoietin production in interaction with the duration of exclusive breast-feeding (P = 0.006). Growth in length during y 1 of life was positively associated with adolescent thymopoietin production (P = 0.002). These associations remained significant after adjusting for a range of potentially confounding variables. These findings provide support for the importance of fetal and early infant programming of thymic function, and suggest that early environments may have long-term implications for immunocompetence and adult disease risk.