The molecular structure of uroporphyrinogen III can be described as a hexahydroporphine core, where each pyrrole ring has the hydrogen atoms on its two outermost carbons replaced by an acetic acid group (−CH2−COOH, "A") and a propionic acid group (−CH2−CH2−COOH, "P"). The groups are attached in an asymmetric way: going around the macrocycle, the order is AP-AP-AP-PA.
The conversion entails a reversal of the last pyrrole unit (thus swapping the acetic and propionic acid groups) and a condensation reaction that closes the macrocycle by eliminating the final hydroxyl−OH with a hydrogen atom of the first ring.
If uroporphyrinogen-III synthase is not present or inactive, the hydroxymethylbilane will spontaneously cyclise into the structural isomeruroporphyrinogen I, which differs from the III isomer in that the acetic acid ("A") and propionic acid ("P") groups are arranged in a rotationally symmetric order, AP-AP-AP-AP. In this case, the next step produced coproporphyrinogen I, which accumulates — leading to the pathological condition congenital erythropoietic porphyria[3]
^ abS. Sassa and A. Kappas (2000): "Molecular aspects of the inherited porphyrias". Journal of Internal Medicine, volume 247, issue 2, pages 169-178. doi:10.1046/j.1365-2796.2000.00618.x