Reactions of 2 arylazo 3 (1 azacycloalk 1 yl) 3 methylsulfanylacrylonitriles with male imide in benzene gave octahydropyrrolo[3,4 a]pyrrolizines 2a-c, decahydro 2,7a diaza cyclopenta[a]indene 2e, and decahydro 5 oxa 2,7a diazacyclopenta[a]indene 2f as a result of 1,3 dipolar cycloaddition. In a similar reaction with 3 allylsulfanyl 2 arylazo 3 (1 azacycloalk 1 yl)acrylonitriles 3, dipolar cycloaddition and intramolecular cyclization competed to give a mixture of compounds 2 (major products) and 1,4,6,7,8,8a hexahydropyrrolo[2,1 c] 1,2,4 triazines 4b-d, 1,6,7,8,9,9a hexahydro 4H pyrido[2,1 c] 1,2,4 triazine 4e, and 1,4,6,7,9,9a hexahydro 1,4 oxazino[3,4 c] 1,2,4 triazine 4f (minor products).