Objective To study the effect of gestational and perinatal exposures on thymic size in 366 normal birth weight and 426 low birth weight (LBW) neonates in Guinea-Bissau in West Africa. Study design In a cross-sectional study, thymic size was measured at birth by the use of ultrasound. Information on possible determinants was collected from pregnancy cards, hospital records, and interviews with the mother. We used the log-transformed thymic index and thymus/weight index as outcome measures. Data were analyzed with adjusted linear regression models providing geometric mean ratios (GMRs) with 95% CI. Results Determinants of thymic size among normal birth weight infants were pathologic amniotic fluid (adjusted GMR for thymic index: 0.84 [0.74-0.96]) and male sex (GMR: 1.13 [1.06-1.22]). Among LBW infants, birth season (1.11 [1.01-1.22]), maternal body temperature (0.89 [0.79-0.98]), antibiotic treatment at the time of labor (0.84 [0.70-1.00]), number of pregnancy consultations (1.03 [1.00-1.05]), maternal age (0.91 [0.84-0.98]), Apgar score (1.06 [1.03-1.10]), and infant convulsions (0.44 [0.29-0.65]) were all independent determinants of thymic index but not all were determinants of thymus/weight index. Pathologic amniotic fluid and cesarean delivery were associated with thymus/weight index among LBW infants (0.85 [0.75-0.95] and 0.80 [0.67-0.96]) but were only borderline significant for thymic index. Conclusion Exposures mainly related to stress and infections were associated with a smaller thymus, mainly in LBW infants.