2-Pyrrolecarboxylic acid (I) was condensed with ethyl 3-(methylamino)-propionate (II) by means of diethyl phosphorocyanidate to give amide (III). Alkaline hydrolysis of the ethyl ester group of (III) provided carboxylic acid (IV), which was cyclized in 80% polyphosphoric acid at 100 C to afford the pyrroloazepine (V). Subsequent reaction of (V) with 1,4-dichlorobutane (VI) in the presence of K2CO3 yielded the N-(4-chlorobutyl)pyrrole (VII). Treatment of (VII) with hydroxylamine hydrochloride and NaOAc furnished the E-oxime (VIII) as the major isomer. Then, displacement of the chloro atom of (VIII) with 4-(4-fluorobenzoyl)piperidine-HCl (IX) using K2CO3 and NaI yielded the title compound.