A straightforward synthesis of various nitrogenated heterocycles using a cyanoacetylating reagent from cyanoacetic acid and acetic anhydride is described. Biological testing of the synthesized compounds for their antibacterial and antifungal activities has been carried out.Heterocycles containing cyanoacetyl groups are relatively low explored; most of reported preparations were obtained either via nucleophilic displacement of halide atom in haloacetyl derivatives by cyanide [1] or from an alkyl carboxylate reacted with acetonitrile in presence of a strong base [2]. It was reported that cyanoacetic acid could serve as a building block in various reactions such as cyclization [3] and synthesis of coumarins [4] and other heterocycles [5]. The activation of cyanoacetic acid by conversion to a mixed anhydride with acetic anhydride was also used [6 -8], but the generality, simplicity and usefulness of this method was not appreciated and this reagent was rarely used for N-acetylation of, e.g., urea and C-acetylations of enamines [9]. Other activation procedures, such as conversions to cyanoacetyl chloride, have also been used, although this reagent is characterized by a tendency to self-polymerization, particularly when heated [7].Recently, we reported the use of cyanoacetic acid in the synthesis of simple nitrogenated heterocyclic compounds [10,11] to demonstrate the general applicability of cyanoacetic acid -acetic anhydride reagent. We have investigated its scope on selected simple nitrogenated compounds, namely, 2-imidazolidone (Ia) and thiosemicarbazide (Ib) to afford 3-oxo-3-(2-oxoimidazol-1-yl)propanenitrile (IIa) and 2-cyano-N-(5-methyl-1,3,4-thiadiazol-2-yl)acetamide (IIb) respectively, in good yields (Scheme 1). The structures of IIa and IIb were determined on the basis of analytical data. The IR spectrum of IIa revealed absorption bands at 1756, 1675 (2CO) , 3270 and 2260 cm -1 attributed to NH and CN groups, respectively, while its 1 H NMR spectrum showed, in addition to the two triplet signals (two protons each) of imidazolone CH 2 , a new singlet at ( = 4.30 ppm characteristic of CH 2 CN protons. In a similar manner, the IR spectrum of IIb showed absorptions bands at 3170 (NH), 2250 (CN) and 1690 (CO) cm -1 and its 1 H NMR spectrum displayed signals at ( = 2.70 (CH 3 ), 4.20 (CH 2 CN) and 12.75 ppm (exchangeable NH proton); in addition, the mass spectrum showed ion peak [M + ] at m/z = 182, which was in agreement with the calculated molecular weight (C 6 H 6 N 4 OS) (see the Experimental section).Compounds IIa and IIb can serve as building blocks in the synthesis of various nitrogenated bioactive molecules; thus, nitrosation of IIa and IIb using sodium nitrite afforded the corresponding hydroxyimino derivatives IIIa and IIIb, respectively. The 1 H NMR spectrum of IIIb as a representative example showed a signal due to hydroxyl proton (D 2 O exchangeable) at 10.92 ppm, instead of the CH 2 protons signal previously observed for the parent substance; in addition, the mass spectrum revealed ion peak [M + ] at ...