AP-1 (activator protein-1) transcription factors, also known as JUN factors, are broadly acting factors regulating many inducible genetic responses. Schraml et al. report a surprising mechanism that expands the biological repertoire of the AP-1 family. They find that the AP-1 transcription factor Batf plays a critical role in the differentiation of IL17-producing T-helper cells. TH17 cells comprise a subset of CD4+ T cells that coordinate the inflammatory response in host defence but are pathogenic in autoimmunity. Here, the AP-1 transcription factor BATF is shown to have a critical role in TH17 cell differentiation, with Batf−/− mice displaying a defect in TH17 differentiation and resistance to experimental autoimmune encephalomyelitis. Activator protein 1 (AP-1, also known as JUN) transcription factors are dimers of JUN, FOS, MAF and activating transcription factor (ATF) family proteins characterized by basic region and leucine zipper domains1. Many AP-1 proteins contain defined transcriptional activation domains, but BATF and the closely related BATF3 (refs 2, 3) contain only a basic region and leucine zipper, and are considered to be inhibitors of AP-1 activity3,4,5,6,7,8. Here we show that Batf is required for the differentiation of IL17-producing T helper (TH17) cells9. TH17 cells comprise a CD4+ T-cell subset that coordinates inflammatory responses in host defence but is pathogenic in autoimmunity10,11,12,13. Batf-/- mice have normal TH1 and TH2 differentiation, but show a defect in TH17 differentiation, and are resistant to experimental autoimmune encephalomyelitis. Batf-/- T cells fail to induce known factors required for TH17 differentiation, such as RORγt11 (encoded by Rorc) and the cytokine IL21 (refs 14–17). Neither the addition of IL21 nor the overexpression of RORγt fully restores IL17 production in Batf-/- T cells. The Il17 promoter is BATF-responsive, and after TH17 differentiation, BATF binds conserved intergenic elements in the Il17a–Il17f locus and to the Il17, Il21 and Il22 (ref. 18) promoters. These results demonstrate that the AP-1 protein BATF has a critical role in TH17 differentiation.