Reaction of 5-amino-3-methyl-1-phenyl-1H-pyrazole with azlactones under solvent-free conditions with heating furnished tetrahydro-1H-pyrazolo[3,4-b]pyridines. The latter were converted to oxazolo[5,4-b]pyrazolo[4,3-e]pyridines by the action with POCl3 on air. Further reaction of oxazolo[5,4-b]pyrazolo[4,3-e]pyridines with hydrazine hydrate and alkali led to the formation of 5-amino-1,7-dihydro-6H-pyrazolo[3,4-b]pyridin-6-ones, which reacted with aluminum chloride to yield 3,4-dihydro-5H-pyrazolo[4,3-f][1,7]naphthyridin-5-ones. Some of the synthesized compounds show antioxidant activity or are effective phosphors.