The reaction of 1,2-dimethyl-3-benzoyl-4-aminopyrrole (I) with phthalimidoacetyl chloride (II) by means of NaOH gives 1,2-dimethyl-3-benzoyl-4-(phthalimidoacetamido)pyrrole (III), which is cyclized by reaction with hydrazine in refluxing methanol.