2-Acetyl-1-methyl-1H-benzimidazole reacts with dimethylformamide-dimethyl-acetal (DMF-DMA) to afford the corresponding E-1-(1-methyl-1H-benzimidazol-2-yl)-3-N,N-dimethylaminoprop-2-enone. The latter compound reacts regioselectively with some nitrilimines and nitrile oxides to afford the corresponding pyrazole and isoxazole derivatives, respectively. These reaction products react with hydrazine hydrate to give the novel pyrazolo[3,4-d]pyridazine and isoxazolo[3,4-d]pyridazine derivatives, respectively.