The Mannich reaction in the synthesis of N,S containing heterocycles 4.* Aminomethylation of 6 amino 3,5 dicyano 1,4 dihydropyridine 2 thiolates: a convenient regioselective route to 3,5,7,11 tetraazatricyclo[7.3.1.0 2,7 ]tridec 2 ene derivatives Treatment of N methylmorpholinium 4 R 6 amino 3,5 dicyano 1,4 dihydropyridine 2 thiolates (R = 2 ClC 6 H 4 and 2 MeOC 6 H 4 ) with primary amines in the presence of an excess of formaldehyde gave 13 R 8 thioxo 3,5,7,11 tetraazatricyclo[7.3.1.0 2,7 ]tridec 2 ene 1,9 dicarbonitrile derivatives in high yields (66-95%). In a similar way, aminomethylation of 3 R 10 amino 7,11 dicyano 9 aza 3 azoniaspiro[5.5]undeca 7,10 diene 8 thiolates (R = Me and Et) afforded 1´ alkyl 8 thioxospiro [3,5,7,11 tetraazatricyclo[7.3.1.0 2,7 ]tridec 2 ene 13,4´ piperidine] 1,9 dicarbonitriles in 43-91% yields. Alternatively, these compounds were ob tained by multicomponent cyclocondensation of N alkylpiperidin 4 ones, cyanothioacetamide, primary amines, and aqueous formaldehyde. The starting 3 R 10 amino 7,11 dicyano 9 aza 3 azoniaspiro[5.5]undeca 7,10 diene 8 thiolates were prepared by a new method from N alkylpiperidin 4 ones and cyanothioacetamide. The structure of 5,11 bis(4 ethoxyphenyl) 13 (2 methoxyphenyl) 8 thioxo 3,5,7,11 tetraazatricyclo[7.3.1.0 2,7 ]tridec 2 ene 1,9 di carbonitrile was examined by X ray diffraction analysis.Key words: N methylmorpholinium 6 amino 4 aryl 3,5 dicyano 1,4 dihydropyridine 2 thiolates, the Mannich reaction, cyclocondensation, X ray diffraction analysis, 3,5,7,11 tetra azatricyclo[7.3.1.0 2,7 ]tridec 2 ene 1,9 dicarbonitriles, 3 R 10 amino 7,11 dicyano 9 aza 3 azoniaspiro[5.5]undeca 7,10 diene 8 thiolates, 1´ alkyl 8 thioxospiro [3,5,7,11 tetraazatri cyclo[7.3.1.0 2,7 ]tridec 2 ene 13,4´ piperidine] 1,9 dicarbonitriles, cyanothioacetamide, N al kylpiperidin 4 ones. * For Part 3, see