The reaction of benzimidazolium salt (3) and polarized olefins (1a,b,d and 2c) with K2CO3 in CHCl3 gave the corresponding benzimidazolium N-allylides (4a-d). Thermolyses of N-allylides (4a,b) in refluxing xylene afforded the 1,5-dipolar cyclization product, benzopyrroloimidazole (5a), whereas heating of N-allylides (4c,d) resulted in back-donated 1,6-cyclization to give the mesomeric betaines, benzimidazopyridiniumides (7a,b). Treatment of 3 and 2a with K2CO3 in CHCl3 yield directly benzopyrroloimidazole (5b), while similar treatment of 3 with 1c or 2b gave benzopyrrolopyrazines (6a,b).