The invention relates to a process for the preparation of racemic or optically active epibatidine of the Formula XIV ##STR1## which comprises subjecting racemic or optically active epi-epibatidine-of the Formula XIII ##STR2## to epimerization in the presence base. The advantage of the process is that readily available starting materials are used and the procedure is suitable for industrial scale productions too. Epibatidine is a known highly affective analgesic active ingredient.