The reaction of methyl N-methyl-1,2,5,6-tetrahydropyridine-3-carboxylate (I) with phenylmagnesium bromide (A) gives methyl 1-methyl-4-phenylpiperidine-3-carboxylate (II), which is reduced with LiAlH4 yielding 1-methyl-3-hydroxymethyl-4-phenylpiperidine (III), which, in turn is resolved into its optical isomers. The alcohol (III) is esterified with methanesulfonyl chloride in pyridine affording 3-(methansulfonyloxymethyl)-1-methyl-4-phenylpiperidine (IV), which is finally condensed with p-methoxyphenol (B) by means of sodium methoxide in refluxing methanol.