The condensation of 1-benzylpiperidin-4-one (I) with 4-acetamidoacetophenone (II) by means of lithium diisopropylamide in HMPA/THF gives the piperidinol (III), which is dehydrated by reaction first with SOCl2 and then with NaOH yielding a mixture of compounds (IV) and (V) with exo and endo double bonds. This mixture is hydrogenated with H2 over PtO2 in ethanol/toluene to afford the saturated piperidine derivative (VI), which is treated with HCl in refluxing ethanol to cleave the acetamido substituent giving (VII) with a free amino group. Finally, this compound is condensed with 4-chloro-5-methylpyrimidine (VIII) by means of HCl in refluxing ethanol/CHCl3.