This study examines the relationship between malaria treatment failure after sulfadoxine-pyrimethamine (S-P) chemotherapy and presence of mutations in the Plasmodium falciparum dihydropteroate synthase (dhps) and dihydrofolate reductase (dhfr) genes (associated with resistance in vitro to S and P) before treatment. In Kenya, 38 malaria patients in a holoendemic area, and 21 in an epidemic area, participated in the trial in 1997-98. In the 2 areas, drug failure occurred in 76% and 75% of cases where any mutation in dhfr was seen (positive predictive values 76% and 75%: P = 0.003 and 0.008) and an identical association was seen with dhfr Asn-108. In the holoendemic area all occurrences of > or = 2 mutations in dhfr predicted drug failure. Only 3 instances were seen in the epidemic focus, but treatment failed in all. Only in the epidemic focus, 7 (88%) of 8 occurrences of > or = 1 mutations in dhps, and all occurrences of the Gly-437 allele of dhps, predicted failure. Association between mutations in dhps and mutations in dhfr was noted in the combined sites, irrespective of outcome. Although this makes the relationship of combined dhfr and dhps mutations to failure more difficult to interpret, it nevertheless supports S-P selection acting on both genes. In the holoendemic site, treatment success increased with age. In this location, acquired immunity may mask the impact of mutations in dhps, since sulfadoxine is a less effective treatment than pyrimethamine.