New series of pyrimidine, pyridine and thiophene derivatives were prepared by reaction of appropriate 3-oxobutanamides with urea, thiourea, active methylene compounds, arylidines, salicyaldehyde, chalcones, benzyl isothiocyanate and aminopyrazoles. Compounds 2a, 3a, 3c and 9 show activity against some bacterial species, whereas, no activity was observed for compounds 3b, 4, 5, 7e, 7f, 10 and 11 against all bacterial species (Graphical Abstract).