The invention concerns a process for preparing amidines and their salts with inorganic or organic acids. According to this process, the corresponding nitrile is reacted with ammonia, a C1-C6 alkylamine or hydrazine in the presence of a mercapto carboxylic acid and optionally in the presence of an inorganic or organic ammonium salt.