Primary amines react with carbon disulfide in presence of alkali to form a dithiocarbamate salt, which on treatment with mercuric chloride yields pungent alkyl isothiocyanates (mustard oil):
$$RNH_{2} + \mathrm{CS}_{2} + \mathrm{KOH} \rightarrow RNHCS_{2}K + H_{2}O$$$$RNHCS_{2}K + \mathrm{HgCl}_{2} \rightarrow R\!-\!N=C=S + \mathrm{HgS}\downarrow + 2\,\mathrm{KCl}$$