Infections with human immunodeficiency virus (HIV) and the closely related monkey viruses simian-human immunodeficiency virus (SHIV) and simian immunodeficiency virus (SIV) are characterized by progressive waves of immune responses, followed by viral mutation and "immune escape." However, escape mutation usually leads to lower replicative fitness, and in the absence of immune pressure, an escape mutant (EM) virus "reverts" to the wild-type phenotype. Analysis of the dynamics of immune escape and reversion has suggested it is a mechanism for identifying the immunogens best capable of controlling viremia. We have analyzed and modeled data of the dynamics of wild-type (WT) and EM viruses during SHIV infection of macaques. Modeling suggests that the dynamics of reversion and immune escape should be determined by the availability of target cells for infection. Consistent with this suggestion, we find that the rate of reversion of cytotoxic T-lymphocyte (CTL) EM virus strongly correlates with the number of CD4 ؉ T cells available for infection. This phenomenon also affects the rate of immune escape, since this rate is determined by the balance of CTL killing and the WT fitness advantage. This analysis predicts that the optimal timing for the selection of immune escape variants will be immediately after the peak of viremia and that the development of escape variants at later times will lead to slower selection. This has important implications for comparative studies of immune escape and reversion in different infections and for identifying epitopes with high fitness cost for use as vaccine targets.