Tuberculosis causes 2 million deaths per year, yet in most cases the immune response successfully contains the infection and prevents disease outbreak. Induced lymphoid structures associated with pulmonary granuloma are observed during tuberculosis in both humans and mice and could orchestrate host defense. To investigate whether granuloma perform lymphoid functions, mice lacking secondary lymphoid organs (SLO) were infected with Mycobacterium tuberculosis (MTB). As in WT mice, granuloma developed, exponential growth of MTB was controlled, and antigen-specific T-cell responses including memory T cells were generated in the absence of SLO. Moreover, adoptively transferred T cells were primed locally in lungs in a granuloma-dependent manner. T-cell activation was delayed in the absence of SLO, but resulted in a normal development program including protective subsets and functional recall responses that protected mice against secondary MTB infection. Our data demonstrate that protective immune responses can be generated independently of SLO during MTB infection and implicate local pulmonary T-cell priming as a mechanism contributing to host defense.