The reaction of some 2-aminopyrrole-3-carbonitriles 1a-c with formic acid gave the pyrrolo[2,3-d]pyrimidin-4(3H)-ones 2a-c which afforded the 4-chloropyrrolo[2,3-d]pyrimidines 3a-c on reaction with phosphorus oxychloride.The latter afforded the pyrrolo [2,3-d] pyrimidine-4-amines 4a-c via their treatment with aromatic amines. On the other hand, treatment of compounds 1b,d with formic acid in the presence of formamide and N,N-dimethylformamide afforded the 4-aminopyrrolo[2,3-d]pyrimidines 5a.b.