The reaction of pyridine-3-carbaldehyde (I) with KCN in acetic acid, followed by a treatment with NH4Cl in aqueous NH4OH yields 2-amino-2-(3-pyridyl)acetonitrile (II), which is cyclized to 3-chloro-4-(3-pyridyl)-1,2,5-thiadiazole (III) by a treatment with S2Cl2 in DMF. The reaction of (III) with sodium hexyloxide in hexanol yields 3-(hexyloxy)-4-(3-pyridyl)-1,2,5-thiadiazole (IV), which is treated with methyl iodide in acetone to afford the corresponding N-methylpyridinium salt (V). Finally, this compound is hydrogenated with NaBH4 in ethanol and salified with oxalic or L-tartaric acid in acetone or isopropanol.