A pyridine carboxylic acid anilide (III) can be produced by reacting a pyridine carboxylic acid chloride (I) with an aromatic amine (II). The pyridine carboxylic acid anilide (III) is hydrogenated to the corresponding piperidine carboxylic acid anilide (IV), which is thereafter hydroalkylated