A simple route for the synthesis of 5-aminopyrazole derivatives (9) was described through the readily accessible acrylamide derivative (7). Reaction of the aminopyrazole with different reagents such as ,-unsaturated nitriles affo rded pyrazol[1,5-a]pyrimid ine (13,15,18). The structure of the enaminonitrile (6) was studied with different reagents such as thiourea and 2-thio xo-(1H)-pyrimid ine-4-one (36) afforded pyrimid inethione derivative (35) and the pyrido[2,3-d]pyrimidi ne derivative (41), respectively.