Our models suggest that the interplay between spatial heterogeneity (with the virus infecting the respiratory tract and the immune response being generated in the secondary lymphoid organs) and T cell differentiation (with proliferation occurring in the lymphoid organs giving rise to a subpopulation of resident T cells in the respiratory tract) is the key to understand the dynamics of protection afforded by the CD8 T cell response to influenza. This evidence concerns the gene CD8A and influenza.