The efficacy of ofloxacin in preventing infection in neutropenic patients following cytotoxic chemotherapy was evaluated and was compared with that of co-trimoxazole. A total of 102 patients with hematological malignancies were randomly selected to receive either co-trimoxazole or ofloxacin. All patients were monitored for compliance, occurrence of infection, and drug-related side effects. A surveillance culture of a rectal swab was performed regularly. A total of 25 of the 52 patients (48%) who received co-trimoxazole and 11 of the 50 patients (22%) who received ofloxacin developed fever during the study period (P less than 0.025). Gram-negative bacteremia occurred in nine patients in the co-trimoxazole group (17%) but in only one patient (2%) in the ofloxacin group (P less than 0.05). No patient in either group had documented gram-positive bacterial or Pneumocystis carinii infection. Poor performance status was the only identifiable factor associated with an increased incidence of bacteremia. The surveillance study showed that significantly fewer bacterial strains were resistant to ofloxacin than to co-trimoxazole and that acquisition of resistance to co-trimoxazole was more commonly observed than was acquisition of resistance to ofloxacin. Significantly more patients had skin rashes following co-trimoxazole than ofloxacin treatment (P less than 0.05). Ofloxacin was superior to co-trimoxazole in preventing infection in this population of neutropenic patients.