Mucosal-associated invariant T cells (MAIT cells) detect microbial vitamin B2 derivatives presented by the antigen-presenting molecule MR1. Here we defined three developmental stages and checkpoints for the MAIT cell lineage in humans and mice. Stage 1 and stage 2 MAIT cells predominated in thymus, while stage 3 cells progressively increased in abundance extrathymically. Transition through each checkpoint was regulated by MR1, whereas the final checkpoint that generated mature functional MAIT cells was controlled by multiple factors, including the transcription factor PLZF and microbial colonization. Furthermore, stage 3 MAIT cell populations were expanded in mice deficient in the antigen-presenting molecule CD1d, suggestive of a niche shared by MAIT cells and natural killer T cells (NKT cells). Accordingly, this study maps the developmental pathway and checkpoints that control the generation of functional MAIT cells.