The reaction of 5-bromo-2-(methylsulfanyl)pyrimidine-4-carboxylic acid (I) with ammonia and CuSO4 in water gives 5-amino-2-(methylsulfanyl)pyrimidine-4-carboxylic acid (II), which is cyclized with formamide or formamidine acetate by heating at 180 C to yield 4-hydroxy-6-(methylsulfanyl)pyrimido[5,4-d]pyrimidine (III). The reaction of (III) with refluxing SOCl2 affords the corresponding 4-chloro derivative (IV), which is condensed with 3-chloro-4-fluoroaniline (V) in hot dioxane to provide the secondary amine (VI). Alternatively, (VI) can also be obtained by direct condensation of the 4-hydroxy compound (III) with aniline (V) by means of HMDS and Ts-OH at 140 ?C. The oxidation of the sulfanyl group of (VI) with MCPBA in dichloromethane provides a mixture of the sulfinyl derivative (VII) and the sulfonyl derivative (VIII), which, without isolation, is finally condensed with 1-methylpiperidin-4-amine (IX) by means of DIEA in hot DMF to give the target pyrimido-pyrimidine-diamine.