Objectives - To assess the incidence of the AIDS dementia complex and the presence of HIV I p24 antigen in cerebrospinal fluid in relation to zidovudine treatment. Design - Retrospective study of a consecutive series of patients with AIDS from 1982 to 1988. Setting - An academic centre for AIDS. Patients - 196 Patients with AIDS and neurological symptoms examined from 1982 to 1988. Interventions - Zidovudine treatment, which was introduced to The Netherlands on 1 May 1987 for patients with severe symptoms of HIV infection (Centers for Disease Control groups IVA, B, C, and D). Main outcome measures - Diagnosis of AIDS dementia complex and presence of HIV I p24 antigen in cerebrospinal fluid. Results - The AIDS dementia complex was diagnosed in 40 of the 196 (20%) patients with AIDS. Thirty eight of 107 patients with AIDS (36%) not taking zidovudine developed the AIDS dementia complex compared with two of the 89 (2%) taking the drug (p < 0.00001). The incidence of the AIDS dementia complex increased to 53% in the first half of 1987, after the introduction of zidovudine in May 1987, decreasing to 10% in the second half of 1987 and to 3% in 1988. Dementia was diagnosed before definition of the AIDS dementia complex (1986) according to DSM-III criteria and there was good agreement between diagnosis before and after 1986. Sixteen of 61 samples of cerebrospinal fluid (26%) from patients with AIDS (10 with AIDS dementia complex) not taking zidovudine were positive for HIV I p24 antigen, whereas none of 37 cerebrospinal fluid samples from patients with AIDS (two with the AIDS dementia complex) taking zidovudine were positive. Conclusions - The incidence of AIDS dementia complex in patients with AIDS declined after the introduction of systematic treatment with zidovudine; the AIDS dementia complex might be prevented by inhibiting viral replication in the central nervous system.