502-508A four-step preparation of compounds containing a pyrimidine moiety is presented. This synthesis involves especially a Vilsmeier–Haack reaction and the synthesized compounds screened for their antibacterial activity against Gram-positive and Gram-negative organisms, as well as for antifungal activities. Structures of all the newly synthesized compounds were confirmed by their FTIR, 1H NMR, mass spectral and elemental analysis data. Some of the newly synthesized compounds show excellent antimicrobial activity and appear to be the most proficient members of the series