Our data show that IL-17 is required for protective immunity against Mtb HN878 infection by mediating correct T cell localization near Mtb-infected macrophages for optimal macrophage activation. This evidence concerns the gene IL17A and infection.