N-[4-(Dicyanomethylazo)phenyl]-2-saccharin-2-ylacetamide (2) proved to be a convenient precursor for the synthesis of a variety of pyridazine and pyrimidine derivatives 4a,b,6, and 7. Also a series of substituted pyrimidines 10-16 were prepared from the reaction of N-[4-(2-amino-1-cyano-2-substitutedvinylazo)phenyl]-2-(saccharin-2-yl)acetamide 9a,b with different reagents via ini-tial addition to either the cyano or amino group, followed by cyclization. Some of the synthesized heterocycles were screened for their biological activity. C