1-Ethoxycarbonyl-4-piperidone (I) is treated with pyrrolidine (II) and then with ethyl bromoacetate (IV) to give ethyl 1-ethoxycarbonyl-4-piperidone-3-acetate (VI) which is cyclized with hydrazine to (VII). Bromination, reaction with phosphorous oxychloride, and then with benzoylchloride (XI) leads to (XII) which affords the title compound with hydrazine.