Methyl 2-(2-benzoylphenylamino)-2-oxoacetate and dimethyl 2, 2′-(4, 4′-methylenebis (4, 1-phenylene) bis (azanediyl)) bis (2-oxoacetate) undergo a smooth reaction with triphenylphosphine and dialkyl acetylenedicarboxylates to produce corresponding highly functionalised 5-oxo-4, 5-dihydro-1H-pyrroles and 5-oxo-2, 5-dihydro-1H-pyrroles derivatives.