4‐Hydrazino‐7H‐pyrrolo[2,3‐d]pyrimidines 4 were cyclocondensed with formic acid or triethyl orthoformate to give 7H‐pyrrolo[3,2‐e][1,2,4]triazolo[1,5‐c]pyrimidines 6 and 7H‐pyrrolo[3,2‐e][1,2,4]triazolo[4,3‐c]pyrimidines 7, respectively. The [4,3‐c] isomers 7 were rearranged into thermodynamically more stable [1,5‐c] isomers 6. The identical compounds 6 were prepared using another route by reacting 3‐amino‐4‐imino‐7H‐pyrrolo[2,3‐d]pyrimidines 3 with formic acid or triethyl orthoformate. The reaction of 2‐amino‐3‐cyanopyrroles 1 with triethyl orthoformate gave N‐ethoxymethylene‐2‐amino‐3‐cyanopyrroles 2. Further reaction with an equivalent of hydrazine hydrate provided 3‐amino‐4‐imino‐7H‐pyrrolo[2,3‐d]pyrimidines 3, whereas treatment with excess of hydrazine hydrate, 3 rearranged to 4‐hydrazino‐7H‐pyrrolo[2,3‐d]pyrimidines 4. Compounds 4 were also obtained by the treatment of N‐ethoxymethylene‐2‐amino‐3‐cyanopyrroles 2 in excess of hydrazine hydrate. © 2007 Wiley Periodicals, Inc. Heteroatom Chem 18:265–273, 2007; Published online in Wiley InterScience (http://www.interscience.wiley.com). DOI 10.1002/hc.20295