The acylation of aryl-and hetarylacetonitriles with various acylating agents (the anhydrides, halides, and esters of amino-substituted [1-3], mercapto-substituted [4-6], hydroxy-substituted [7,8], and chloro-substituted [9-12] carboxylic acids of the aliphatic, aromatic, and heterocyclic series), leading to the formation of pyridine [2, 3], pyrrole [2, 10, 11], thiophene [4, 6], quinoline [9], and benzopyran [7,8] derivatives, was studied earlier.The presence of functional groups in the molecules of these compounds makes it possible to modify them for the production of substances with valuable characteristics and, in particular, biologically active products.The acylation of hetarylacetonitriles 1a,b with ethyl mercaptoacetate 2a in the presence of sodium tertbutoxide, which clearly takes place through a C-acylation stage, was described earlier [6]. However, it is not possible to isolate the 3-cyano-3-hetaryl-2-oxopropanethiols that form since they undergo cyclization under the reaction conditions with the formation of 2-amino-3-hetaryl-4(5H)-oxothiophenes.