A series of new 2,4‐diaminothieno[2,3‐d]‐ and 2,4‐diaminopyrrolo[2,3‐d]pyrimidine derivatives were synthesised. Reaction of 2‐amino‐4,6‐dichloropyrimidine‐5‐carbaldehyde ( 1 ) with ethyl mercaptoacetate, methyl N‐methylglycinate or ethyl glycinate afforded ethyl (2‐amino‐4‐chloro‐5‐formylpyrimidin‐6‐yl)thioacetate ( 2a ), methyl N‐(2‐amino‐4‐chloro‐5‐formylpyrimidin‐6‐yl)‐N‐methylglycinate ( 2b ) and ethyl N‐(2‐amino‐4‐chloro‐5‐formylpyrimidin‐6‐yl)glycinate ( 2c ), respectively. Compounds 2a,b by treatment with bases cyclised to the corresponding 2‐amino‐4‐chlorothieno‐ and pyrrolo[2,3‐d]pyrimidine‐6‐carboxylates ( 3a,b ). Heating 2,4‐diamino‐6‐chloropyrimidine‐5‐carbaldehyde ( 5 ) with ethyl mercaptoacetate or methyl N‐methylglycinate gave 2,4‐diaminothieno[2,3‐d]‐ and 2,4‐diaminopyrrolo[2,3‐d]‐pyrimidine‐6‐carboxylates ( 6a,b ), whereas compound 5 with ethyl glycinate under the same reaction conditions afforded ethyl N‐(2,4‐diamino‐5‐formylpyrimidin‐6‐yl)glycinate ( 7 ). Treatment of 2,4‐diaminothieno[2,3‐d]pyrimidine‐6‐carboxylic acid ( 8a ) with 4‐methoxy‐, 3,4,5‐trimethoxyanilines or ethyl N‐(4‐aminobenzoyl)‐L‐glutamate in the presence of dicyclohexylcarbodiimide and 1‐hydroxybenzotriazole furnished the corresponding N‐arylamides 9‐11.