Recently, CD4+ single positive (SP) thymocytes that express retinoic acid receptor-related orphan receptor-γt (RORγt) and secrete interleukin-17 (IL-17) were identified (natural TH17 cells). This study describes the requirements for the development of natural TH17 cells. Unlike conventional CD4+ SP thymocytes and peripheral TH17 cells, IL-17-producing CD4+ SP thymocytes showed a skewed expression of the Vβ3 T cell receptor (TCR) chain. Interestingly, MHC class II expression on medullary but not cortical thymic epithelial cells was necessary for the development of natural TH17 cells. Moreover, defective TCR signalling (owing to a mutation in the gene encoding the TCR signalling adaptor SLP76) resulted in increased numbers of natural TH17 cells in the thymus, but blocked the differentiation of peripheral CD4+ T cells into effector TH17 cells in the intestine, suggesting that these two IL-17-producing T cell populations are distinct.