The preparation of E and Z isomers of 3-ureido-2-cyano-2-propenoates Ia - Id and their base-catalyzed isomerization and cyclization to 5-carboxycytosine derivatives IIa - IIf and 5-cyanouracil derivatives IIIa and IIIb is described. Also described is the preparation of 3-ureido-2-acyl-2-propenoates Va - Vd and their base-catalyzed cyclization to 5-carboxy-2(1H)-pyrimidone derivatives VIa - VIc and 5-acyluracils VIIa - VIIc.