Cl[C:2]1[C:3]2[CH:10]=[CH:9][S:8][C:4]=2[N:5]=[CH:6][N:7]=1.C(O)C.C(=O)([O-])[O-].C([N:21](C(C)C)CC)(C)C>C(#N)C>[N:5]1[C:4]2[S:8][CH:9]=[CH:10][C:3]=2[C:2]([NH2:21])=[N:7][CH:6]=1An amine (VIII) is added to a solution of the 4-chlorothieno[2,3-d]pyrimidine (VII) in either ethanol or a mixture of acetonitrile and a base (for example an alkaline carbonate or diisopropylethylamine) in a closable bottle. The bottle is closed with a polypropylene cap, and heated overnight in a conventional oven at a temperature comprised between 40° and 120° C., preferably between 60 and 85° C. After cooling, the solvent is removed under reduced pressure, and the residue is purified by flash chromatography to provide the final thieno[2,3-d]pyrimidin-4-ylamine (I).