In a randomized, double-blind, placebocontrolled study to evaluate the efficacy of trimethoprim-sulfamethoxazole for the prevention of Pneumocystis carinii pneumonia, we studied 160 patients with cancer who were at high risk for this pneumonia over a two-year period. Seventeen of the 80 patients receiving a placebo acquired P. carinii pneumonitis, whereas none of the 80 given 150 mg of trimethoprim and 750 mg of sulfamethoxazole per square meter per day had the infection P less than 0.01). Bacterial sepsis, pneumonia other than that caused by P. carinii, acute otitis media, upper-respiratory-tract infections, sinusitis and cellulitis occurred less frequently in recipients of the drug than in the placebo group (P less than 0.01 in each case). Oral candidiasis was the only adverse effect ecountered from trimethoprim-sulfamethoxazole administration. The study shows the combination to be highly effective in the prevention of P. carinii pneumonitis.