N-Benzoylisonipecotic acid (I) was chlorinated with SOCl2 to produce the corresponding acid chloride (II). Acylation of the lithium enolate of (4-methoxyphenyl)acetone (III) with acid chloride (II) provided a mixture of diketone regioisomers (IV) and (V); these were separated by column chromatography. The desired diketone (IV) was then cyclized with guanidine (VI) in hot pyridine to afford the pyrimidine (VII). Basic hydrolysis of the benzamide function of (VII) gave the piperidine derivative (VIII). The target amide was finally prepared by acylation of (VIII) with 3,4-methylenedioxybenzoic acid (IX) in the presence of EDC.