After infection, most antigen-specific memory T cells reside in nonlymphoid tissues. Tissue-specific programming during priming leads to directed migration of T cells to the appropriate tissue, which promotes the development of tissue-resident memory in organs such as intestinal mucosa and skin. Mechanisms that regulate the retention of tissue-resident memory T cells include transforming growth factor-β (TGF-β)-mediated induction of the E-cadherin receptor CD103 and downregulation of the chemokine receptor CCR7. These pathways enhance protection in internal organs, such as the nervous system, and in the barrier tissues--the mucosa and skin. Memory T cells that reside at these surfaces provide a first line of defense against subsequent infection, and defining the factors that regulate their development is critical to understanding organ-based immunity.