Pyridinium (methoxycarbonyl)methylide generated from (methoxycarbonyl)methyl pyridinium halides under the action of K 2 CO 3 reacts with alkyl diazoacetates in CH 2 Cl 2 at 20 °C, resulting in the successive addition of three CHCOOMe fragments from the ylide to form 3,6 bis(alkoxycarbonyl) 4,5 diazaoctadienoic acid diesters. Heating of the latter in the presence of pyridine leads to their isomerization to give tetraalkyl tetrahydropyridazine tetracarboxylates in high yields. Under more drastic conditions (refluxing xylene in the pres ence of pyridine), the acyclic tetraesters undergo another transformation to form pyrrole tetracarboxylic acid esters in yields of up to 60%.