In a PCR reaction, cofactors such as divalent cations (MgCl2) are needed for an optimal process. Magnesium interacts with the DNA template, dNTPs and the polymerase in a PCR reaction. The MgCl2 concentration influences the productivity and accuracy of the polymerase. It also influences the binding of the primers to the template.