The immune system preserves and makes use of autoreactive lymphocytes with specialized functions. Here we showed that one of these populations, CD8alphaalpha(+)TCRalphabeta(+) intestinal intraepithelial lymphocytes (IELs), arose from a unique subset of double-positive thymocytes. This subset of cells was precommitted to preferentially give rise to CD8alphaalpha(+)TCRalphabeta(+) IELs, but they required exposure to self-agonist peptides. The agonist-selected TCRalphabeta(+) thymocytes are CD4 and CD8 double-negative, and their final maturation, including the induction of CD8alphaalpha expression, appeared to occur only after thymus export in the IL-15-rich environment of the gut. These developmental steps, including precommitment of immature thymocytes, TCR-mediated agonist selection, and postthymic differentiation promoted by cytokines, define a unique pathway for the generation of CD8alphaalpha(+)TCRalphabeta(+) IEL.