5-Substituted 3-amino-1H-pyrazole-4-carbonitriles 2a-d react with appropriate biselectrophilic reagents in the presence of (TEA) to give the substitution products pyrazolo [1, 5-a] pyrimidines 4a-d, 6a-d and pyrazolo [1, 5-a] 1, 3, 5-triazines 8a-d. Compounds 6a and 8a react with secondary amines to 10a-c and 11a-c. Treatment of 2a with malonodinitrile results in the substituted pyrazolo-[1, 5-a] pyrimidine 16. Condensation of ...