The reaction of 2,4,6-triamino-5-methylquinazoline (I) with NaNO2 and aqueous HCl gives the corresponding diazonium salt (II), which by a Sandmeyer reaction with cuprous cyanide in hot water yields 2,4-diamino-5-methylquinazoline-6-carbonitrile (III). Finally, this compound is reductocondensed with 3,4,5-trimethoxyaniline (IV) by means of H2 over Raney-Ni in acetic acid.