Although used widely, the effectiveness of zidovudine therapy and primary prophylaxis for Pneumocystis carinii pneumonia (PCP) in HIV-1-infected individuals, has not been assessed in a large cohort. We have done an observational study between October, 1986, and October, 1990, of a cohort of 2145 HIV-1-seropositive men and 371 who seroconverted during the study. A Markov chain transitional analysis was used to examine the effect of zidovudine and PCP prophylaxis on the probability of progression of HIV-1 infection to AIDS (after 6, 12, 18, and 24 months) after follow-up visits categorised into one of six disease states. The six starting states were based on CD4+ lymphocyte counts and the presence of HIV-related symptoms. Use of pre-AIDS zidovudine and PCP prophylaxis was associated with significant reductions in rates of progression to AIDS at 6, 12, 18, and 24 months for participants starting with less than 350 CD4+ lymphocytes/microliter. For those starting with 350 or more CD4+ lymphocytes/microliter, non-significant protective trends were seen during 12, 18, and 24 month intervals. In multivariate log-linear models virtually all the treatment effect was due to zidovudine. However, after adjusting for the effects of zidovudine, PCP prophylaxis reduced significantly the probability of progression to a first episode of PCP during 6, 12, 18, and 24 month intervals. This study suggests that early primary PCP prophylaxis is effective in preventing first episodes of PCP, and that the efficacy of zidovudine demonstrated in clinical trials can be translated to the population level.