Knoevenagel condensation of 7-(4-amino-3-cyano-5,10-dioxo-1,5,10,10a-tetrahydrobenzo [g] quinolin-2-yl)-3,5-dioxo-3,5-dihydro-2H-thiazolo[3,2-a]pyrimidine-6-carbonitrile (1) with aldehydes 2a-c afforded the respective 7-(4-amino-3-cyano-5,10-dioxo-1,5, 10,10a-tetrahydrobenzo[g]quinolin-2-yl)-2-arylidene-3,5-dioxo-3,5-dihydro-2H-thiazolo[3,2-a]pyrimidine-6-carbonitrile derivatives 3a-c. A number of interesting fused heterocyclic derivatives were prepared through heterocyclization reactions of compounds 3a-c with some selected bidentate nitrogen nucleophiles, namely, hydrazine hydrate in acetic acid, phenyl-hydrazine, hydroxylamine hydrochloride, urea and thiourea to afford the polycondensed ring systems of N-acetylpyrazolothiazolopyrimidines 4a-c, N-phenylpyrazolothiazolopyrimidines 5a-c, isoxazolothiazolopyrimidines 6a-c, oxopyrimidothiazolopyramidines 7a-c and thioxopyrimidothiazolopyrimidines 8a-c, respectively. Structures of the new products were elucidated by elemental analyses as well as spectroscopic measurements (IR, H-1-NMR and MS).