We conducted a double-blind, placebo-controlled trial of the efficacy of oral azidothymidine (AZT) in 282 patients with the acquired immunodeficiency syndrome (AIDS) manifested by Pneumocystis carinii pneumonia alone, or with advanced AIDS-related complex. The subjects were stratified according to numbers of T cells with CD4 surface markers and were randomly assigned to receive either 250 mg of AZT or placebo by mouth every four hours for a total of 24 weeks. One hundred forty-five subjects received AZT, and 137 received placebo. When the study was terminated, 27 subjects had completed 24 weeks of the study, 152 had completed 16 weeks, and the remainder had completed at least 8 weeks. Nineteen placebo recipients and 1 AZT recipient died during the study (P less than 0.001). Opportunistic infections developed in 45 subjects receiving placebo, as compared with 24 receiving AZT. The base-line Karnofsky performance score and weight increased significantly among AZT recipients (P less than 0.001). A statistically significant increase in the number of CD4 cells was noted in subjects receiving AZT (P less than 0.001). After 12 weeks, the number of CD4 cells declined to pretreatment values among AZT recipients with AIDS but not amonG AZT recipients with AIDS-related complex. Skin-test anergy was partially reversed in 29 percent of subjects receiving AZT, as compared with 9 percent of those receiving placebo (P less than 0.001). These data demonstrate that AZT administration can decrease mortality and the frequency of opportunistic infections in a selected group of subjects with AIDS or AIDS-related complex, at least over the 8 to 24 weeks of observation in this study.