Mucosal delivery of a multistage subunit vaccine promotes development of lung-resident memory T cells and affords interleukin-17-dependent protection against pulmonary tuberculosis. This evidence concerns the gene IL17A and pulmonary tuberculosis.