(A) The frequency of WT and escape variant (MT) infections as a function of time. When CD8 T cell responses are compensated for and, thus, decrease the selective advantage, the MT only invades transiently and goes extinct in the long run (m = 0.001, s = 0.05, f = 0.1, r = 0.5, and c = 0.9). (B) MT prevalence predicted by the epidemiological model with different extents of compensation (black lines) compared to the population genetics model (blue line). In all scenarios, the initial invasions of the MT (before it reaches 50% prevalence) are similar. After it reaches 50%, if the extent of compensation is smaller than the threshold (in our parameter setting, c* = 0.8; see equation 2), and then MT goes to fixation only slightly slower than that predicted by the population genetics model. In contrast, if the extent of compensation is higher than the threshold, the MT invades transiently and becomes extinct in the long run. (C) The parameter regimes of s and f where either MT or WT becomes fixed (and the other becomes extinct). We see that as the extent of compensation rises, the parameter regime where MT becomes fixed shrinks.