Although the fetal immune system is considered tolerogenic, preterm infants can suffer from severe intestinal inflammation, including necrotizing enterocolitis (NEC). Here, we demonstrate that human fetal intestines predominantly contain tumor necrosis factor-α (TNF-α) + CD4 + CD69 + T effector memory (Tem) cells. Single-cell RNA sequencing of fetal intestinal CD4 + T cells showed a T helper 1 phenotype and expression of genes mediating epithelial growth and cell cycling. Organoid co-cultures revealed a dose-dependent, TNF-α-mediated effect of fetal intestinal CD4 + T cells on intestinal stem cell (ISC) development, in which low T cell numbers supported epithelial development, whereas high numbers abrogated ISC proliferation. CD4 + Tem cell frequencies were higher in inflamed intestines from preterm infants with NEC than in healthy infant intestines and showed enhanced TNF signaling. These findings reveal a distinct population of TNF-α-producing CD4 + T cells that promote mucosal development in fetal intestines but can also mediate inflammation upon preterm birth. The fetal immune system is considered anti-inflammatory; nonetheless, preterm infants are at risk for necrotizing enterocolitis (NEC), a severe intestinal inflammatory disease. Schreurs et al. demonstrate that fetal TNF-α + CD4 + T cells promote gut development early in life. However, in preterm babies these TNFα + CD4 + T cells can mediate intestinal inflammation, providing a potential mechanism for NEC.