Ferrochelatase, the terminal enzyme in heme biosynthesis, catalyses metal insertion into protoporphyrin IX. The location of the metal binding site with respect to the bound porphyrin substrate and the mode of metal binding are of central importance for understanding the mechanism of porphyrin metallation. In this work we demonstrate that Zn(2+), which is commonly used as substrate in assays of the ferrochelatase reaction, and Cd(2+), an inhibitor of the enzyme, bind to the invariant amino acids His183 and Glu264 and water molecules, all located within the porphyrin binding cleft. On the other hand, Mg(2+), which has been shown to bind close to the surface at 7 A from His183, was largely absent from its site. Activity measurements demonstrate that Mg(2+) has a stimulatory effect on the enzyme, lowering K(M) for Zn(2+) from 55 to 24 micro M. Changing one of the Mg(2+) binding residues, Glu272, to serine abolishes the effect of Mg(2+). It is proposed that prior to metal insertion the metal may form a sitting-atop (SAT) complex with the invariant His-Glu couple and the porphyrin. Metal binding to the Mg(2+) site may stimulate metal release from the protein ligands and its insertion into the porphyrin.