Pyrazino[2',3':4,5]thieno[3,2-d]pyrimidine derivatives 6 were synthesized by the intermolecular aza-Wittig reaction of N-heteroaryl phosphazene derivatives with carboxylic acid chlorides. The heterocyclization occurs via imidoyl chloride intermediates derived from phosphazenes 4a,b, obtained in a one-step process from alpha-azidothieno[2,3-b]pyrazine carboxylic acid 3. Moreover, cyclic pyrazinothienopyrimidines were prepared, in a two-step procedure, from amides and azidothienopyrazine-alpha-carbonyl chloride using an intramolecular aza-Wittig heterocyclization reaction strategy.