Dapsone exhibits activity against Mycobacterium tuberculosis and Mycobacterium avium complex (MAC) in vitro. We retrospectively examined the incidence of mycobacterial diseases within a randomized prospective trial of prophylaxis for Pneumocystis carinii pneumonia and toxoplasmosis. Of 501 participants who had not previously had a mycobacterial disease, 274 received dapsone/pyrimethamine (200/75 mg once weekly) and 227 received aerosolized pentamidine (300 mg once every 4 weeks). The median CD4 lymphocyte count was 113/microL, and the median duration of treatment was 369 days. Six cases of tuberculosis, 22 of MAC infection, and 3 of Mycobacterium genavense disease occurred during treatment. Stratified by basement CD4 lymphocyte counts, the annual product-limit incidence of mycobacterial disease was 5% during treatment with dapsone/pyrimethamine vs. 12% during treatment with aerosolized pentamidine for patients whose counts were 0-24/microL, 0 vs. 12% for those whose counts were 25-49/microL, and 7% vs. 9% for those whose counts were 50-99/microL. Adjusted for CD4 lymphocyte counts at start of treatment, the relative risk for patients receiving dapsone/pyrimethamine was 0.47 (95% confidence interval, 0.19-1.16; P = .10). This inexpensive and simple regimen may prevent mycobacterial diseases and warrants further investigation as a means of prophylaxis for multiple opportunistic diseases.