Methods for the synthesis of substituted pyrimido[4,5 a] and pyrido[4,3 a]carbazoles were proposed. Condensation of 2 (dimethylaminomethylene) 6 methyl 2,3,4,9 tetrahydro 1H carbazol 1 one with guanidine and thiourea afforded 2 amino 8 methyl 6,11 dihydro 5H pyrimido[4,5 a]carbazole and 8 methyl 3,5,6,11 tetrahydro 2H pyrimido[4,5 a]carb azole 2 thione, respectively. The reaction of cyano(6 methyl 2,3,4,9 tetrahydro 1H carbazol 1 ylidene)acetamide with dimethylformamide dimethyl acetal gave N (dimethylamino methylene)cyano(6 methyl 2,3,4,9 tetrahydro 1H carbazol 1 ylidene)acetamide. Cycliza tion of the latter yielded 1 cyano 8 methyl 3,5,6,11 tetrahydro 2H pyrido[4,3 a]carb azol 2 one.