1-Substituted 5-aminopyrazol-3-ones react selectively with ethoxymethylidene beta-dicarbonyl compounds (3-ethoxymethylidene-2,4-pentanedione, diethyl 2-ethoxymethylidenemalonate, and ethyl 2-ethoxy-methylideneacetoacetate) with the formation of dihydropyrazolylaminomethylidene beta-dicarbonyl derivatives, which undergo thermal intramolecular cyclization to 5-functionalized dihydro-pyrazolo[3,4-b]pyridin-3-ones.