Magnesium may influence the incidence of cardiac arrhythmias by 1) a direct effect 2) an effect on potassium metabolism 3) an effect as a calcium blocking agent. In the event of a magnesium deficiency the cell cannot attract potassium against the transmembrane concentration gradient. The reason may be that a magnesium deficiency interferes with the function of membrane ATPase, and thus the pumping of sodium out from the cell and potassium into the cell is impaired. The interference from a magnesium deficiency on the equilibrium of potassium between the intra- and extracellular spaces may result in changes in the resting membrane potential, changes in potassium conductance across the cell membrane as well as disturbances in the repolarization phase.