Starting from 2,7-dimethyl-8-phenylazo-4(6H)-pyrazolo[1,5-a]-pyrimidinone 1, a series of functionalized derivatives of the title tricyclic system 4 have been synthesized via its reaction with various hydrazonoyl halides 2 and cyclization of the resulting substitution products 3. The mechanism and the site selectivity of the reactions studied are discussed. The structures of the compounds 3 and 4 isolated were elucidated on the basis of their spectra, elemental analyses and alternate synthesis.