N-cyano, N-acyl and N-ethoxycarbonyl imidates are well known as versatile reagents in the synthesis of heterocyclic compounds. These imidates react with alkyl mercaptoacetates, in basic medium, to lead to the formation of 4-amino-5-alcoxycarbonylthiazoles, 5- alcoxycarbonylthiazoles and 5-alcoxycarbonyl-4-hydroxythiazoles.