The three-domain structure of porphobilinogen deaminase, a key enzyme in the biosynthetic pathway of tetrapyrroles, has been defined by X-ray analysis at 1.9 Å resolution. Two of the domains structurally resemble the transferrins and periplasmic binding proteins. The dipyrromethane cofactor is covalently linked to domain 3 but is bound by extensive salt-bridges and hydrogen-bonds within the cleft between domains 1 and 2, at a position corresponding to the binding sites for small-molecule ligands in the analogous proteins. The X-ray structure and results from site-directed mutagenesis provide evidence for a single catalytic site. Interdomain flexibility may aid elongation of the polypyrrole product in the active-site cleft of the enzyme.