As part of the heme biosynthetic pathway, catalyzes the sequential polymerization of four molecules of porphobilinogen to form hydroxymethylbilane, also known as preuroporphyrinogen (PubMed:18936296, PubMed:19138865, PubMed:23815679). Catalysis begins with the assembly of the dipyrromethane cofactor by the apoenzyme from two molecules of porphobilinogen or from preuroporphyrinogen. The covalently linked cofactor acts as a primer, around which the tetrapyrrole product is assembled. In the last step of catalysis, the product, preuroporphyrinogen, is released, leaving the cofactor bound to the holodeaminase intact (PubMed:18936296). H2O + 4 porphobilinogen = hydroxymethylbilane + 4 NH4(+) Binds 1 dipyrromethane group covalently. Displays high thermal stability. The half-denaturation temperature (Tm) is about 74 degrees Celsius. Porphyrin-containing compound metabolism; protoporphyrin-IX biosynthesis; coproporphyrinogen-III from 5-aminolevulinate: step 2/4. Monomer. Is ubiquitously expressed. Is found only in erythroid cells. The disease is caused by variants affecting the gene represented in this entry. Belongs to the HMBS family.