In this longitudinal case–control study of HIV-uninfected men with median 21 years of follow-up, low CD4 T-cell count and nadir and low CD4:CD8 ratio nadir were associated with increased risk of virus-associated cancers (p ≤ 0.002 in Cox hazard models). Here, CD4 is linked to cancer.