To examine the efficacy and tolerance of pentamidine aerosol in the prevention of Pneumocystis carinii pneumonia (PCP) relapse in patients with the acquired immunodeficiency syndrome (AIDS) being treated with zidovudine, 51 patients who had had an episode of PCP in the previous 5 months were enrolled in a randomised controlled study. 25 patients (group I) received pentamidine mesylate aerosol (4 mg/kg every 2 weeks for the first month then monthly) and zidovudine, and 26 patients (group II) zidovudine alone. 3 group I patients withdrew from pentamidine therapy prematurely and were excluded from the analysis of efficacy. Relapses of PCP occurred in 2 out of 22 (9%) group I patients and in 16 out of 26 (61%) group II patients after a mean follow-up of 10 and 8.7 months, respectively. The two groups differed significantly (p less than 0.0001) in proportions without relapse. They did not differ in proportions surviving. Bronchial intolerance was common (47%); no systemic side-effects of pentamidine were observed. Pentamidine aerosol thus seems to be effective in preventing PCP relapses in AIDS patients on zidovudine. The early termination of the trial prevented assessment of the long-term efficacy and safety of pentamidine given by aerosol.