Pyrazolo[3', 4' : 4, 5]pyrido[2, 3-d]pyrimidine derivatives were obtained from the reaction of tosylhydrazones of 6-allylaminopyrimidine-2, 4(1H, 3H)-dione-5-carbaldehydes with lead tetraacetate in good yields. In this reaction, the nitrile imide intermediates underwent an intramolecular 1, 3-dipolar addition reaction to yield the tricyclic heterocycles. Pyrazolo[3, 4-d]pyrimido[4, 5-b]-azepine derivatives were also prepared by similar oxidation of tosylhydrazones of the corresponding 6-alkenylaminopyrimidine-2, 4(1H, 3H)-dione-5-carbaldehydes.