[N:1]1([C:6]2[CH:7]=[C:8]([CH:13]=[CH:14][CH:15]=2)[C:9]([O:11][CH3:12])=[O:10])[CH:5]=[CH:4][CH:3]=[CH:2]1.Cl.[CH3:17][NH:18][CH3:19].[CH2:20]=O>C(O)C>[CH3:17][N:18]([CH2:20][C:5]1[N:1]([C:6]2[CH:7]=[C:8]([CH:13]=[CH:14][CH:15]=2)[C:9]([O:11][CH3:12])=[O:10])[CH:2]=[CH:3][CH:4]=1)[CH3:19]The mixture of methyl 3-(pyrrol-1-yl)benzoate (20.0 g), dimethylamine hydrochloride (12.2 g) and paraformaldehyde (13.4 g) in ethanol (60 ml) was heated under reflux for 3 hours under stirring. The solvent was removed by concentration and the residue was added to the mixture of ethyl acetate and water. The mixture was adjusted to pH 12 with 5N-sodium hydroxide solution. The separated organic layer was washed with brine, dried over magnesium sulfate, and evaporated. The residue was purified by column chromatography on silica gel eluting with a mixture of chloroform and methanol (9:1, V/V). The eluted fractions containing the desired product were collected and evaporated in vacuo to give methyl 3-(2-dimethylaminomethylpyrrol-1-yl)benzoate (15.3 g) as an oil.