4-(2-Pyridinylamino)-1, 1, 1-trifluoro-3-penten-2-ones 3, obtained from the reaction of commercially available 2-aminopyridine derivatives and 4-methoxy-1, 1, 1-trifluoro-3-penten-2-one 2, were converted to 6-(dimethylamino)-4-(2-pyridinylamino)-3, 5-hexadien-2-ones 4 by treatment with dimethylformamide dimethyl acetal. Azannulation of hexadienones 4 afforded 4-(2-pyridinylamino)-2-trifluoromethylpyridines 5 and 2-(trifluoroacetylmethylene)pyrido[1, 2-a]pyrimidines 6, classes of compounds particularly interesting from a chemical and biological point of view.