acids, the tri-, tetra- and pentacyclic pyrazolo[3,4-d]pyrimidines 2–6 were prepared. The acetylhydrazide 1a reacted with levulinic acid to yield a pyrazoloazepinone 7, together with the pyrrolopyrazolopyrimidinone 8, by acylation of the primary amine following intramolecular cyclization involving either the pyrazole carbon or the hydrazide imino group. After separation, the structures of the new compounds