Pyrimidinyl pyrazole (III) was prepared by condensation of diketone (I) with 2-hydrazinopyrimidine (II). Subsequent Mannich reaction with N-(3-chlorophenyl)piperazine (IV) and paraformaldehyde furnished piperazinyl propanone (V). This was reduced to alcohol (VI) with NaBH4. Alcohol dehydration employing p-toluenesulfonic acid yielded the title compound, that was finally isolated as the hydrochloride salt. The intermediate N-(3-chlorophenyl)piperazine (IV) has been obtained by cyclization of bis(2-chloroethyl)amine (VII) with 3-chloroaniline (VIII) by means of Na2CO3 in refluxing butanol.