Longitudinal studies of patients infected with HIV-1 reveal a long and variable incubation period between infection and the development of AIDS. Data from a small number of infected patients show temporal changes in the number of genetically distinct strains of the virus throughout the incubation period, with a slow but steady rise in diversity during the progression to disease. A mathematical model of the dynamic interaction between viral diversity and the human immune system suggests the existence of an antigen diversity threshold, below which the immune system is able to regulate viral population growth but above which the virus population induces the collapse of the CD4+ lymphocyte population. The model suggests that antigenic diversity is the cause, not a consequence, of immunodeficiency disease. The model is compared with available data, and is used to assess how the timing of the application of chemotherapy or immunotherapy influences the rate of progress to disease.