Pneumocystis carinii pneumonia (PCP) is an infection of immunocompromised patients. The purpose of our study was to estimate the risk of PCP in renal transplant recipients in relation to number, timing, and type of rejection treatments and to cytomegalovirus (CMV) infection. In a case-control study, 15 renal transplant recipients with proven PCP were compared with 95 controls. The relative risks of PCP for 1, 2, and > or = 3 rejection treatments vs. no such treatment were 1.7 (95% CI, 0.2-12.5), 4.8 (95% CI, 0.9-25.5), and 9.5 (95% CI, 1.6-56.4). The relative risk of PCP for renal transplant recipients with negative pretransplantation CMV serology was 3.2 (95% CI, 1.0-10.2), and for the combination of recipient-negative and donor-positive pretransplantation CMV serology it was 5.7 (95% CI, 1.4-22.3). The relative risk of PCP for patients with CMV infection was 5.0 (95% CI, 1.6-15.8). The risk of PCP in renal transplant recipients was positively related to the number but not the timing or type of rejection treatments. The risk of PCP was also increased in cases of CMV infection, irrespective of the number of rejection treatments.