Despite active immune responses, gammaherpesviruses establish latency. In a related process, these viruses also persistently replicate by using a mechanism that requires different viral genes than acute-phase replication. Many questions remain about the role of immunity in chronic gammaherpesvirus infection, including whether the immune system controls latency by regulating latent cell numbers and/or other properties and what specific immune mediators control latency and persistent replication. We show here that CD8+ T cells regulate both latency and persistent replication and demonstrate for the first time that CD8+ T cells regulate both the number of latently infected cells and the efficiency with which infected cells reactivate from latency. Furthermore, we show that gamma interferon (IFN-γ) and perforin, which play no significant role during acute infection, are essential for immune control of latency and persistent replication. Surprisingly, the effects of perforin and IFN-γ are site specific, with IFN-γ being important in peritoneal cells while perforin is important in the spleen. Studies of the mechanisms of action of IFN-γ and perforin revealed that perforin acts primarily by controlling the number of latently infected cells while IFN-γ acts primarily by controlling reactivation efficiency. The immune system therefore controls chronic gammaherpesvirus infection by site-specific mechanisms that regulate both the number and reactivation phenotype of latently infected cells.