The condensation between 3-(4-methoxyphenyl)propyl hydrazine (I) and (ethoxymethylene)malononitrile (II) afforded the pyrazole (III), which was transformed to the corresponding imidate (IV) by refluxing in triethyl orthoformate. Reaction of imidate (IV) with 2-furoic acid hydrazide (V) provided the pyrazolopyrimidine intermediate (VI), which was thermally cyclized in diphenyl ether to the tricyclic derivative (VII). Hydrolysis of (VII) with HCl induced the pyrimidine ring opening to furnish (VIII). This was finally converted into the title compound by treatment with cyanamide in N-methylpyrrolidone.