Condensation of benzaldehyde with malononitrile and malononitrile dimer (2-aminopropene-1,1,3-tricarbonitrile) in the presence of an excess of morpholine in ethanol afforded the morpholinium salt of 6-amino-2-(dicyanomethylene)-4-phenyl-1,2-dihydropyridine-3,5-dicarbonitrile. The latter, under the Mannich reaction conditions with the participation of primary amines and formaldehyde, gives 6-amino-2-(dicyanomethylene)-4-phenyl-1,2-dihydropyridine-3,5-dicarbonitrile, 2-(dicyanomethylene)-6-(hydroxymethylamino)-4-phenyl-1,2-dihydropyridine-3,5-dicarbonitrile or zwitterionic aminomethylation products, 6-(ammoniomethylamino)-3,5-dicyano-4-phenylpyridin-2-yl)dicyanomethanides. Structure of the obtained compounds was established using 2D NMR spectroscopy and single crystal X-ray diffraction analysis