A simple, facile, efficient and three-components procedure for the synthesis of pyrimido[1,2-a]benzimidazoles and pyrazolo[3,4-b]pyridines utilizing phenylsulfone synthon, under ultrasonic irradiation was developed.