A series of nine 2,4-diamino-5-[6-( or 7-)quinolylmethyl]pyrimidines has been prepared by condensations of quinolinecarboxaldehydes with beta-anilinopropionitriles, followed by treatment with guanidine. All compounds has basic or methoxy substituents at the 2- or 4-positions of the quinoline ring. All of the 6-quinolylmethyl derivatives were highly inhibitory against Escherichia coli dihydrofolate reductase (DHFR), provided that an 8-substituent was present in the quinoline ring. Those compounds that had basic substituents in the 2-position of the quinoline ring were also highly specific for bacterial dihydrofolate DHFR, relative to a vertebrate counterpart. Protonation on the quinoline ring nitrogen is a possible cause of specificity.