Cyclization of 1,2-diamino-4(4-chlorophenyl)-6-oxo-1,6-dihydropyrimidine-5-carbonitrile 2 with a variety of electrophilic reagents results in formation of a new series of pyrimidine heterocycles including pyrimidotriazepines, pyrimidotriazines and triazolopyrimidines. Some newly synthesized compounds are tested for their antibacterial activity against Gram-positive and Gram-negative bacteria.