Benzazolo [2,1-b]quinazolinones and triazolo[2,1-b]quinazolinones were synthesized in high yields by the condensation reaction of an aldehyde and a cyclic β-diketone with 2 - aminobenzimidazole, 2 - aminobenzothiazole or 1, 2, 4 - triazole derivatives in 1 - butyl - 3 -methylimidazolium bromide as an ionic liquid under classic heating conditions within 5-60 minutes.