Decreased thymopoietic capacity contributes to the severe and clinically significant immune deficiency seen after bone marrow transplantation (BMT). One mechanism for thymopoietic failure is damage to the interleukin 7 (IL-7)-producing thymic epithelial cells (TECs) by irradiation and chemotherapy, which can be partially treated by IL-7 administration. Pretreatment of BMT recipients with keratinocyte growth factor (KGF, or Fgf7), an epithelial cell-specific growth factor, protects mucosal, cutaneous, and pulmonary epithelial cells from cytotoxic therapy-induced damage in experimental murine models. Like other epithelial cells, TECs specifically express KGF receptors. Because KGF specifically protects KGF receptor-bearing epithelial cells and post-BMT immune deficiency is caused by loss of TECs, we hypothesized that KGF pretreatment would improve post-BMT thymic function. To test the hypothesis, BMT recipient mice were given KGF or placebo prior to congenic or allogeneic BMT. Administration of KGF before murine BMT significantly increased the capacity of the thymus to generate donor-derived thymocytes. KGF pretreatment also normalized the proportion of thymic subpopulations, increased the number of naive T cells in the periphery, and improved the response to neoantigen immunization. KGF treatment caused increased production of intrathymic IL-7, and the thymopoietic effects of KGF required an intact IL-7 signaling pathway. These resuits demonstrate that KGF may have immunomodulatory effects by a unique mechanism of protection of TECs. Furthermore, thymic injury and prolonged posttransplantation immune deficiency in BMT recipients can be prevented by KGF administration.