As part of a search for dihydrofolate reductase (DHFR) inhibitors combining the high potency of piritrexim (PTX) with the high antiparasitic vs mammalian selectivity of trimethoprim (TMP), the heretofore undescribed 2,4-diamino-6-(2',5'-disubstituted benzyl)pyrido[2,3-d]pyrimidines 6-14 with O-(omega-carboxyalkyl) or omega-carboxy-1-alkynyl groups on the benzyl moiety were synthesized and tested against Pneumocystis carinii, Toxoplasma gondii, and Mycobacterium avium DHFR vs rat DHFR. Three N-(2,4-diaminopteridin-6-yl)methyl)-2'-(omega-carboxy-1-alkynyl)dibenz[b,f]azepines (19-21) were also synthesized and tested. The pyridopyrimidine with the best combination of potency and selectivity was 2,4-diamino-5-methyl-6-[2'-(5-carboxy-1-butynyl)-5'-methoxy]benzyl]pyrimidine (13), with an IC(50) value of 0.65 nM against P. carinii DHFR, 0.57 nM against M. avium DHFR, and 55 nM against rat DHFR. The potency of 13 against P. carinii DHFR was 20-fold greater than that of PTX (IC(50) = 13 nM), and its selectivity index (SI) relative to rat DHFR was 85, whereas PTX was nonselective. The activity of 13 against P. carinii DHFR was 20 000 times greater than that of TMP, with an SI of 96, whereas that of TMP was only 14. However 13 was no more potent than PTX against M. avium DHFR, and its SI was no better than that of TMP. Molecular modeling dynamics studies using compounds 10 and 13 indicated a slight binding preference for the latter, in qualitative agreement with the IC(50) data. Among the pteridines, the most potent against P. carinii DHFR and M. avium DHFR was the 2'-(5-carboxy-1-butynyl)dibenz[b,f]azepinyl derivative 20 (IC(50) = 2.9 nM), whereas the most selective was the 2'-(5-carboxy-1-pentynyl) analogue 21, with SI values of >100 against both P. carinii and M. avium DHFR relative to rat DHFR. The final compound, 2,4-diamino-5-[3'-(4-carboxy-1-butynyl)-4'-bromo-5'-methoxybenzyl]pyrimidine (22), was both potent and selective against M. avium DHFR (IC(50) = 0.47 nM, SI = 1300) but was not potent or selective against either P. carinii or T. gondii DHFR.