The cyclization of 1-butyl-6-chloro-5-cyano-3-propyluracil (I) with methoxycarbonylhydrazine (II) in refluxing methanol yields 3-amino-7-butyl-4,6-dioxo-5-propyl-4,5,6,7-tetrahydro-2H-pyrazolo[3,4-d]pyrimidine-2-carboxylic acid ethyl ester (III), which is then methylated with methyl iodide and K2CO3 in DMF.