Tissue-resident memory T cells (TRM cells) provide rapid frontline protection from reinfection. Bergsbaken and Bevan identify a gut TRM cell population generated via an unconventional pathway that is protective against a natural mouse intestinal pathogen. We report that oral infection with Yersinia pseudotuberculosis results in the development of two distinct populations of pathogen-specific CD8+ tissue-resident memory T cells (TRM cells) in the lamina propria. CD103− T cells did not require transforming growth factor-β (TGF-β) signaling but were true resident memory cells. Unlike CD103+CD8+ T cells, which were TGF-β dependent and were scattered in the tissue, CD103−CD8+ T cells clustered with CD4+ T cells and CX3CR1+ macrophages and/or dendritic cells around areas of bacterial infection. CXCR3-dependent recruitment of cells to inflamed areas was critical for development of the CD103− population and pathogen clearance. Our studies have identified the 'preferential' development of CD103− TRM cells in inflammatory microenvironments within the lamina propria and suggest that this subset has a critical role in controlling infection.