2,4-Diaminopteridines (21 compounds) and 2,4-diamino-5-methyl-5-deazapteridines (34 compounds) along with three 2,4-diamino-5-unsubstituted-5-deazapteridines and four 2,4-diaminoquinazolines, each with an aryl groups attached to the 6-position of the heterocyclic moiety through a two-atom bridge (either CH2NH, CH2N(CH3),CH2S, or CH2CH2), were synthesized and evaluated as inhibitors of the growth of Toxoplasma gondii in culture and as inhibitors of dihydrofolate reductase enzymes from T. gondii, Pneumocystis carinii, and rat liver. Exceptionally high levels of combined potency and selectivity as growth inhibitors of T. gondii and as inhibitors of the microbial enzymes relative to the mammalian enzyme were found among the 5-methyl-5-deazapteridines but not for the other heterocyclic types. Thirty of the 34 5-methyl-5-deaza compounds gave growth inhibition IC50 values lower than that of pyrimethamine (0.4 microM) with 14 compounds below 0.1 microM, values that compare favorably with those for piritrexim and trimetrexate (both near 0.02 microM). As inhibitors of T gondii DHFR, all but three of the 34 5-methyl-5-deaza compounds gave IC50 values in the order of magnitude with those of piritrexim (0.017 microM) and trimetrexate (0.010 microM), and 17 compounds of this group gave IC50 values versus P. carinii DHFR similarly comparable with those of piritrexim (0.031 microM) and trimetrexate (0.042 microM). Thirteen of these congeners gave both T. gondii growth inhibition and DHFR inhibition IC50 values of 0.10 microM or less, thus indicating facile penetration of the cell membrane. Eleven of these inhibitors of both T. gondii growth and DHFR have selectivity ratios (IC50 rat liver divided by IC50 T. gondii) of 5 or greater for the parasite DHFR. The highest selectivity ratio of nearly 100 belongs to the 5-methyl-5-deaza compound whose 6-substituent is CH2CH2C6H3(OCH3)2-2,5. This compound is over 10(3)-fold more selective for T. gondii DHFR than bridge homologue piritrexim (selectivity ratio 0.088), a compound now in clinical trials. The candidate with CH2NHC6H3(CH3)2-2,5 in the 6-position gave the highest P. carinii DHFR selectivity ratio of 4.0, which is about 60-fold more selective than trimetrexate (0.071) and 80-fold more selective than piritrexim (0.048) toward this enzyme. The 10 best compounds with respect to potency and selectivity includes six compounds bearing 2,5-disubstituted phenyl groups in the side chain (with little, if any, difference in effects of methyl, methoxy, or ethoxy), two side chains bearing 1-naphthyl groups, and two with 5,6,7,8-tetrahydro-1-naphthyl groups. Bridge groups represented in the 10 choice compounds are CH2NH, CH2N(CH3), CH2CH2, and CH2S. The high levels of both potency and selectivity among these agents suggest that in vivo studies now underway may lead to agents that could replace trimetrexate and piritrexim in treatment of toxoplasmosis and P. carinii pneumonia.