This compound can be obtained by several different ways: 1) By condensation of 9,9-dibromo-6-methyl-4-oxo-6,7,8,9-tetrahydropyrido[1,2-a]pyrimidine-3-carboxylic acid (I) with phenylhydrazine (II) by means of N,N-dimethylaniline in DMSO. 2) By a coupling reaction between 6-methyl-4-oxo-6,7,8,9-tetrahydropyrido[1,2-a]pyrimidine-3-carboxylic acid (III) with phenyldiazonium chloride (IV) (prepared with aniline (V), NaNO2 and HCl). 3) The coupling reaction of (IV) with ethyl 6-methyl-4-oxo-6,7,8,9-tetrahydropyrido[1,2-a]pyrimidine 3-carboxylate (VI) gives ethyl 6-methyl-4-oxo-9-(phenylhydrazono)-6,7,8,9-tetrahydro-4H-pyrido[1,2-a]pyrimidine-3-carboxylate (VII), which is hydrolyzed with NaOH in water. 4) By reaction of ethyl 9-bromo-6-methyl-4-oxo-6,7,8,9-tetrahydropyrido[1,2-a]pyrimidine-3-carboxylate (VIII) with (II) in refluxing ethanol, giving (VII), already obtained. 5) By condensation of ethyl 9-hydroxy-6-methyl-4-oxo-6,7,8,9-tetrahydropyrido[1,2-a]pyrimidine-3-carboxylate (IX) with (II) in refluxing ethanol yielding (VII), already obtained.