The reaction of 3(5)-amino-5(3)-methylpyrazole with hexafluoroacetylacetone depending on the process conditions led to the formation either of pyrazolo[1,5-a]pyrimidine or pyrazolo[3,4-b]-pyridine. By means of 2D NMR spectroscopy the structure was established of a stable intermediate product, 2-methyl-5,7-bis(trifluoromethyl)-4,5,6,7-tetrahydropyrazolo[1,5-a] -pyrimidine-5,7-diol, whose dehydration yielded the above compounds. © 2008 MAIK Nauka.