We previously reported that resident gammadelta T cells in the peritoneal cavity rapidly produced IL-17 in response to Escherichia coli infection to mobilize neutrophils. We found in this study that the IL-17-producing gammadelta T cells did not produce IFN-gamma or IL-4, similar to Th17 cells. IL-17-producing gammadelta T cells specifically express CD25 but not CD122, whereas CD122(+) gammadelta T cells produced IFN-gamma. IL-17-producing gammadelta T cells were decreased but still present in IL-2- or CD25-deficient mice, suggesting a role of IL-2 for their maintenance. IFN-gamma-producing CD122(+) gammadelta T cells were selectively decreased in IL-15-deficient mice. Surprisingly, IL-17-producing gammadelta T cells were already detected in the thymus, although CD25 was not expressed on the intrathymic IL-17-producing gammadelta T cells. The number of thymic IL-17-producing gammadelta T cells was peaked at perinatal period and decreased thereafter, coincided with the developmental kinetics of Vgamma6(+) Vdelta1(+) gammadelta T cells. The number of IL-17-producing gammadelta T cells was decreased in fetal thymus of Vdelta1-deficient mice, whereas Vgamma5(+) fetal thymocytes in normal mice did not produce IL-17. Thus, it was revealed that the fetal thymus-derived Vgamma6(+) Vdelta1(+) T cells functionally differentiate to produce IL-17 within thymus and thereafter express CD25 to be maintained in the periphery.