INTRODUCTION — Hypomagnesemia is a common entity occurring in up to 12 percent of hospitalized patients . The incidence rises to as high as 60 to 65 percent in patients in an intensive care setting in which nutrition, diuretics, hypoalbuminemia, and aminoglycosides may play important roles [2-5]. In addition, serum magnesium concentration is a quantitative trait with substantial polygenic heritability, and a number of genome-wide association studies (GWAS) have identified candidate loci associated with low serum magnesium levels [6-8].
There are two major mechanisms by which hypomagnesemia can be induced: gastrointestinal or renal losses (table 1). Regardless of the cause, hypomagnesemia begins to occur after a relatively small magnesium deficit because there is little rapid exchange of extracellular magnesium with the much larger bone and cell stores.
Hypomagnesemia is often associated with hypokalemia (due to urinary potassium wasting) and hypocalcemia (due both to lower parathyroid hormone secretion and end-organ resistance to its effect). (See "Hypomagnesemia: Clinical manifestations of magnesium depletion".)
The major causes of hypomagnesemia will be reviewed in this topic. The regulation of magnesium balance, the signs and symptoms of hypomagnesemia, and the evaluation and treatment of patients with hypomagnesemia are presented elsewhere:
GASTROINTESTINAL LOSSES — Gastrointestinal secretions contain some magnesium, and potential losses are continuous and not regulated. Although the obligatory losses are not large, marked dietary deprivation can lead to progressive magnesium depletion.
Magnesium losses from both the upper and lower gastrointestinal tract can induce hypomagnesemia. In general, magnesium depletion is more commonly due to diarrhea than to vomiting . This is because the magnesium content of lower tract secretions is significantly higher (up to 15 mEq/L versus approximately 1 mEq/L for upper tract). Common settings in which hypomagnesemia may be seen include acute or chronic diarrhea, malabsorption and steatorrhea, and small bowel bypass surgery.
In addition, hypomagnesemia with secondary hypocalcemia can be produced by a familial disorder characterized by a selective defect in magnesium absorption (primary intestinal hypomagnesemia). This disease presents in the neonatal period with hypocalcemia that is responsive to magnesium administration . In some instances, the defect appears to have an X-linked recessive inheritance, but others have described autosomally recessive inheritance with linkage to chromosome 9 . The autosomal recessive form is caused by mutations in the TRPM6 gene [11-15]. The encoded protein, which is expressed both by intestinal epithelia and by the renal distal convoluted tubule, functions as an apical magnesium entry channel . Thus, patients with this disorder have not only decreased intestinal magnesium absorption, but also inappropriate renal magnesium wasting.
Hypomagnesemia can also be seen in acute pancreatitis. The mechanism of hypomagnesemia is presumably similar to the mechanism partially responsible for hypocalcemia in acute pancreatitis: saponification of magnesium and calcium in necrotic fat . The degree of hypocalcemia may be exacerbated by the hypomagnesemia, which can both lower parathyroid hormone secretion and induce end-organ resistance to its effect. (See "Etiology of hypocalcemia in adults" and "Hypomagnesemia: Clinical manifestations of magnesium depletion".)
Proton pump inhibitors — Hypomagnesemia, usually with hypocalcemia, has been described in case reports with the chronic use of omeprazole (usually for more than one year) and other proton pump inhibitors (PPIs) [18-21]. The association of PPIs with lower serum magnesium has also been described in population studies [22-25]. The best data come from a large cohort of 11,490 patients admitted to the intensive care unit at a single center . In this study, the relationship between PPI use and magnesium varied by whether patients concurrently used diuretics (see "Effect of diuretics on magnesium handling by the kidney"):
●In patients taking diuretics, concurrent use of PPIs was associated with a 0.028 mg/dL (0.011 mmol/L) lower adjusted serum magnesium. In addition, the prevalence of hypomagnesemia (defined as a serum magnesium less than 1.6 mg/dL [0.66 mmol/L]) was significantly higher in patients taking both drugs as compared with those who only used diuretics (15.6 versus 11 percent).
●In patients not taking diuretics, use of PPIs was not associated with the serum magnesium or the prevalence of hypomagnesemia.
In a smaller study of 402 inpatients with hypomagnesemia and matched controls, proton pump inhibitors were not associated with hypomagnesemia . However, duration of use was not examined, and most patients were not taking diuretics; therefore, these findings are potentially consistent with those of the larger cohort study. A meta-analysis of studies through 2014 reported a pooled odds ratio for PPI-associated hypomagnesemia of 1.78 (95% CI 1.08-2.92), although there was substantial heterogeneity among the included studies .
The presumed mechanism is impaired absorption of magnesium by intestinal epithelial cells caused by PPI-induced inhibition of transient receptor potential melastatin-6 (TRPM6) and TRPM7 channels . Renal losses are not likely to be involved, since urinary magnesium excretion is appropriately low in patients with hypomagnesemia due to PPIs [20,21]. Some patients have inappropriately low serum parathyroid hormone levels , a finding that is well described in patients with hypomagnesemia due to other causes. (See "Hypomagnesemia: Clinical manifestations of magnesium depletion", section on 'Calcium metabolism'.)
In March 2011, the United States Food and Drug Administration (FDA) issued a safety warning suggesting that, in patients expected to be on PPIs for long periods of time and in those taking other medications associated with hypomagnesemia as described below (eg, diuretics), providers measure serum magnesium levels prior to initiation of PPI therapy and periodically during treatment . The hypomagnesemia can be partially or completely corrected by high-dose oral magnesium supplementation [19-21]. Hypomagnesemia resolves with cessation of PPI therapy [18,19,21].
RENAL LOSSES — Urinary magnesium losses can occur via a variety of either acquired or intrinsic mechanisms. (See "Regulation of magnesium balance".)
Medications — Both loop and thiazide diuretics can inhibit net magnesium reabsorption, while potassium-sparing diuretics may enhance magnesium transport and lower magnesium excretion. The degree of hypomagnesemia induced by loop and thiazide diuretics is generally mild, in part because the associated volume contraction will tend to increase proximal sodium, water, and magnesium reabsorption. A more detailed review of how these changes might occur is discussed separately. (See "Effect of diuretics on magnesium handling by the kidney".)
In addition to loop and thiazide diuretics, many nephrotoxic drugs can produce urinary magnesium wasting , including but not limited to:
●Aminoglycoside antibiotics (see "Aminoglycosides", section on 'Nephrotoxicity')
●Amphotericin B (see "Amphotericin B nephrotoxicity")
●Antibodies targeting the epidermal growth factor (EGF) receptor (cetuximab, panitumumab) (see "Chemotherapy nephrotoxicity and dose modification in patients with kidney impairment: Molecularly targeted agents and immunotherapies", section on 'Anti-EGFR monoclonal antibodies')
The impairment in loop and distal magnesium reabsorption may occur prior to the onset of, and may persist after the resolution of, the acute tubular necrosis and acute kidney injury (AKI) associated with these nephrotoxins. Studies in the rat, for example, have shown a dose-related and rapidly reversible decrease in renal tubular reabsorption of magnesium and calcium (but not sodium and potassium) within 60 minutes of beginning an infusion of gentamicin . The hypermagnesuria in this setting can be striking, and the resulting hypomagnesemia may be sufficient to produce hypocalcemia. With cisplatin therapy, a reduction in gastrointestinal magnesium absorption may also contribute to the hypomagnesemia .
Volume expansion — Expansion of the extracellular fluid volume, by reducing reabsorption of sodium and water, can decrease passive magnesium transport. Mild hypomagnesemia may ensue if this is sustained, as in primary aldosteronism. (See "Pathophysiology and clinical features of primary aldosteronism".)
Alcohol — Hypomagnesemia is common in patients with an alcohol use disorder who are admitted to the hospital; in one study, for example, the prevalence was 30 percent . Excessive urinary excretion of magnesium occurred in 18 of the 38 patients with hypomagnesemia. The defect in urinary excretion appears to reflect alcohol-induced tubular dysfunction that is reversible within four weeks of abstinence . This effect is relatively modest, and other factors are also thought to contribute to hypomagnesemia in these patients, including dietary deficiency, acute pancreatitis, and diarrhea.
Uncontrolled diabetes mellitus — Hypomagnesemia is not uncommon in patients with uncontrolled diabetes mellitus; it appears to be associated with increased urinary magnesium excretion that is reversed by correction of the hyperglycemia with insulin [5,34,35]. It has been proposed, although not proven, that hypomagnesemia may impair glucose disposal and may play a role in the pathogenesis of some of the complications of diabetes.
Posttransplant patients — Hypomagnesemia is common in patients who have received solid organ transplants and may be an important risk factor for new-onset diabetes mellitus after transplantation [36-38].
Hypomagnesemia after transplantation is attributed to renal magnesium wasting  and is primarily caused by treatment with calcineurin inhibitors, which are known to downregulate TRPM6 . These drugs may also increase claudin-14 expression, which would inhibit paracellular magnesium transport . (See "Regulation of magnesium balance".)
The incidence of hypomagnesemia after kidney transplantation in patients treated with tacrolimus may be as high as 43 percent , which is considerably higher than in patients treated with cyclosporine . In such patients who are converted from a calcineurin inhibitor to a mammalian (mechanistic) target of rapamycin (mTOR) inhibitor, serum magnesium levels increase by approximately 0.2 mg/dL, with a concomitant decrease in the fractional excretion of magnesium .
Hypercalcemia — Patients with hypercalcemia due, for example, to hyperparathyroidism can develop mild hypomagnesemia. This finding results at least in part from the fact that calcium and magnesium functionally compete for transport in the thick ascending limb of the loop of Henle. A variety of mechanisms may contribute to the reduction in magnesium reabsorption resulting from hypercalcemia. One well-established mechanism is mediated by the basolateral calcium-sensing receptor (CaSR) in the thick ascending limb:
●Calcium binds to the basolateral CaSR.
●This leads to generation of prostaglandins and cytochrome P450 metabolites in the cell, which inhibit the apical potassium channel (ROMK) [44,45].
●Inhibition of ROMK inhibits sodium chloride reabsorption in the thick ascending limb and reduces paracellular magnesium and calcium reabsorption (figure 1). Inhibition of ROMK in this nephron segment resulting from stimulation of the CaSR is the mechanism underlying type V Bartter syndrome. Thus, hypercalcemia can produce a Bartter-like phenotype. (See "Inherited hypokalemic salt-losing tubulopathies: Pathophysiology and overview of clinical manifestations", section on 'Clinical manifestations'.)
●In addition, stimulation of the CaSR decreases paracellular permeability of the thick ascending limb to both magnesium and calcium , likely due to increased expression of claudin-14 [47,48], which negatively regulates claudin-16 and claudin-19. (See 'Familial hypomagnesemia with hypercalciuria and nephrocalcinosis (FHHNC)' below.)
Other acquired tubular dysfunction — Magnesium wasting can be seen as part of the tubular dysfunction associated with recovery from acute tubular necrosis, following kidney transplantation, or during a postobstructive diuresis.
The diagnosis of primary renal magnesium wasting is one of exclusion. It is established by the demonstration of inappropriately high urinary magnesium excretion in the absence of any other apparent cause. (See "Hypomagnesemia: Evaluation and treatment".)
Gitelman and Bartter syndrome — Gitelman syndrome is the most common form of familial renal magnesium wasting and is usually associated with salt wasting, hypokalemic metabolic alkalosis, and hypocalciuria. It is caused by recessive mutations in the gene coding for the thiazide-sensitive sodium chloride cotransporter (SLC12A3). Although the hypokalemia in this syndrome is usually attributed to decreased sodium chloride transport, direct effects of hypomagnesemia may also contribute . The hypomagnesemia in Gitelman syndrome is significantly more marked than that observed with thiazide administration. Bartter syndrome, particularly the late-onset cases due to mutations in CLCNKB (Bartter syndrome type 3) that resemble Gitelman syndrome, may also present with hypomagnesemia due to defective reabsorption in the thick ascending limb . (See "Inherited hypokalemic salt-losing tubulopathies: Pathophysiology and overview of clinical manifestations".)
EAST (SeSAME) syndrome — EAST syndrome (also known as SeSAME syndrome) is an autosomal recessive disorder that presents in infancy with epilepsy, ataxia, sensorineural deafness, intellectual disability, and a renal salt-losing tubulopathy that resembles Gitelman syndrome and manifests as hypokalemic metabolic alkalosis with hypomagnesemia [57,58]. This syndrome is caused by loss-of-function mutations in the gene encoding the potassium channel, KCNJ10 (Kir4.1), which is expressed on the basolateral membrane of the distal convoluted tubule and regulates expression of the thiazide-sensitive sodium chloride cotransporter .
Familial hypomagnesemia with hypercalciuria and nephrocalcinosis (FHHNC) — This form of primary renal magnesium wasting is autosomal recessive and associated with hypercalciuria; affected patients usually present in childhood or adolescence with symptomatic hypocalcemia [60-64]. Recurrent nephrolithiasis and nephrocalcinosis are also seen, and progression to kidney function impairment and an acidification defect are common. The problem with acidification has been attributed to defective ammonia transfer to the deep nephrons and impaired medullary hydrogen ion secretion due to nephrocalcinosis . Affected patients may also have polyuria and polydipsia due to nephrogenic diabetes insipidus [60,64].
Mutations in the claudin-16 gene (also known as paracellin-1) are the major cause of FHHNC [15,64,66-70]. Claudin-16 is a tight junction protein that facilitates the passive, paracellular reabsorption of both magnesium and calcium in the thick ascending limb of the loop of Henle. Some of these patients present with hypokalemia due to either secondary hyperaldosteronism and/or direct effects of hypomagnesemia on potassium transport.
FHHNC may occasionally be due to mutations in claudin-19 . In addition to hypomagnesemia, nephrolithiasis, and nephrocalcinosis, such patients have ocular involvement , which may include macular colobomata, nystagmus, and myopia.
Na-K-ATPase mutations — A gene responsible for autosomal dominant isolated renal magnesium wasting in two unrelated Dutch families has been mapped to a region on chromosome 11q23 . The abnormality in this disorder appears to be a dominant negative mutation in the gene encoding the gamma subunit of Na-K-ATPase, resulting in misrouting of the protein [74,75]. This may mimic the magnesuric effects of digoxin. In addition, de novo heterozygous loss-of-function mutations in the ATP1A1 gene, which encodes the a1 subunit of the Na-K-ATPase, have been described in three infants with severe hypomagnesemia due to renal magnesium wasting, refractory seizures, and intellectual disability . (See 'Medications' above.)
Voltage-gated potassium channel — A mutation in the gene (KCNA1) that encodes the voltage-gated potassium channel (Kv1.1) is the cause of isolated autosomal dominant hypomagnesemia discovered in a large Brazilian family . This channel colocalizes with the magnesium channel TRPM6 in the distal collecting tubules. Wild type Kv1.1 appears to control TRPM6 magnesium reabsorption via the creation of an appropriate potential across the luminal membrane.
Hepatocyte nuclear factor-1-beta gene mutations — Hypomagnesemia and renal magnesium wasting have been reported in children with known mutations in the hepatocyte nuclear factor-1-beta (HNF-1-beta) gene . The prevalence of hypomagnesemia in such patients increases with age (100 percent by age 13.5 to 18 years) and is associated with a more generalized dysfunction of the distal convoluted tubule that resembles Gitelman syndrome . HNF-1-beta is a transcription factor that regulates the expression of the gamma subunit of Na-K-ATPase and the potassium channel Kir5.1 . These findings suggest that some inactivating mutations of HNF-1-beta can inhibit the Na-K-ATPase and Kir5.1, thereby causing hypomagnesemia/Gitelman-like syndrome, in association with early-onset diabetes and kidney malformations that include multicystic dysplastic disease and obstructive uropathy. (See "Classification of diabetes mellitus and genetic diabetic syndromes".)
Epidermal growth factor gene mutation — Epidermal growth factor (EGF) appears to stimulate distal tubular magnesium reabsorption by binding to a receptor on the basolateral membrane and activating the magnesium channel TRPM6 in the apical membrane. A point mutation in pro-EGF leads to impaired basolateral membrane sorting, inadequate stimulation of renal EGF receptor, insufficient activation of the magnesium channel, and causes isolated autosomal recessive renal magnesium wasting [81,82]. A similar inhibition of the EGF receptor likely underlies the effects of cetuximab and other EGF receptor inhibitors on magnesium transport as previously mentioned [81,82]. (See 'Medications' above.)
PCBD1 mutation — PCBD1 (pterin-4 alpha-carbinolamine dehydratase/dimerization cofactor of hepatocyte nuclear factor-1 homeobox A) is a protein that acts as an enzyme to regenerate tetrahydrobiopterin, which is a cofactor for phenylalanine hydroxylase. Homozygous mutations in PCBD1 in neonates causes transient hyperphenylalaninemia. In addition, PCBD1 acts as a dimerization cofactor for the transcription factor, hepatocyte nuclear factor-1-beta (HNF1B). Homozygous mutations in PCBD1 in adults have been reported to be associated with hypomagnesemia, renal magnesium wasting, and maturity-onset diabetes of the young, mimicking the effect of HNF1B mutations . (See "Classification of diabetes mellitus and genetic diabetic syndromes", section on 'Hepatocyte nuclear factor-1-beta'.)
Cyclin M2 mutations — Mutations in the cyclin M2 (CNNM2) gene have been implicated in two families with dominant isolated renal magnesium wasting . CNNM2 encodes a transmembrane protein that is localized to the basolateral membrane of the thick ascending limb and distal convoluted tubule; it functions either as a magnesium channel  or magnesium-sensitive sodium channel and is upregulated under conditions of magnesium deficiency.
MISCELLANEOUS — Hypomagnesemia has been described in a number of other settings. The following is a partial list of potential causes:
●Intravascular chelation can lead to hypomagnesemia and has been described in the following settings:
•Following surgery, at least in part due to chelation by circulating free fatty acids 
•Ionized hypomagnesemia during liver transplantation due to transfusion of citrate-rich blood products in the absence of adequate hepatic function to metabolize the citrate 
●Hypomagnesemia can occur as part of the "hungry bone" syndrome in which there is increased magnesium uptake by renewing bone following parathyroidectomy for hyperparathyroidism, thyroidectomy for hyperthyroidism, or correction of severe metabolic acidosis . (See "Hungry bone syndrome following parathyroidectomy in end-stage kidney disease patients".)
●Hypomagnesemia has been found in up to 10 percent of patients placed on an extremely high-fat diet to induce ketogenesis as the therapy of intractable epilepsy. The mechanism of this effect is not clear but may result from malabsorption of magnesium . (See "Evaluation and management of drug-resistant epilepsy".)
●Hypomagnesemia due solely to dietary deprivation is exceedingly rare, since nearly all foods contain some magnesium, and renal adaptation to conserve magnesium is highly efficient. Magnesium deficiency has been described rarely with protein-calorie malnutrition . In addition, it may occur in patients with an alcohol use disorder (see 'Alcohol' above), in whom decreased food intake in combination with renal magnesium losses seems to be responsible. Hypomagnesemia is also observed in patients receiving parenteral nutrition, likely due to refeeding syndrome .
●Hypomagnesemia, in combination with hypertension and dyslipidemia, was described in a kindred with a mutation in mitochondrial tRNA . The mutation likely resulted in multiple and varied physiologic disruptions because of its effect on energy consumption. With respect to low magnesium levels, distal convoluted tubule cells could be adversely affected because magnesium reabsorption requires significant energy.
●Hypomagnesemia has been associated with leptospirosis and may be due at least in part to urinary magnesium wasting [94,95].
●General principles – Hypomagnesemia is a common entity occurring in up to 12 percent of hospitalized patients. The incidence rises to as high as 60 to 65 percent in patients in an intensive care setting. There are two major mechanisms by which hypomagnesemia can be induced: gastrointestinal or renal losses (table 1). (See 'Introduction' above.)
●Gastrointestinal losses – Gastrointestinal secretions contain some magnesium. Although the obligatory losses are not large, marked dietary deprivation can lead to progressive magnesium depletion. Magnesium losses from both the upper and lower gastrointestinal tract can induce hypomagnesemia. Common settings in which hypomagnesemia may be seen include acute or chronic diarrhea, malabsorption and steatorrhea, and small bowel bypass surgery. Hypomagnesemia can also be seen in acute pancreatitis. (See 'Gastrointestinal losses' above.)
●Proton pump inhibitor use – Hypomagnesemia has been described with the chronic use of proton pump inhibitors (PPIs), usually for more than one year, and is due to impaired intestinal absorption. The United States Food and Drug Administration (FDA) issued a safety warning suggesting that, in patients expected to be on these drugs for long periods of time and in those taking other medications associated with hypomagnesemia (eg, diuretics), providers should measure serum magnesium levels prior to initiation of therapy and periodically during treatment. (See 'Proton pump inhibitors' above.)
●Renal losses – Urinary magnesium losses can occur via a variety of either acquired or intrinsic mechanisms. These include:
•Medications, including loop and thiazide diuretics and various potential nephrotoxins (see 'Medications' above)
•Sustained expansion of the extracellular fluid volume, as with primary aldosteronism (see 'Volume expansion' above)
•Alcohol use (see 'Alcohol' above)
•Uncontrolled diabetes mellitus (see 'Uncontrolled diabetes mellitus' above)
•Hypercalcemia, as in patients with primary hyperparathyroidism (see 'Hypercalcemia' above)
•Recovery from acute kidney injury (AKI) and following kidney transplantation (see 'Other acquired tubular dysfunction' above)
•Familial renal magnesium wasting, such as with Gitelman syndrome (see 'Familial renal magnesium wasting' above)
ACKNOWLEDGMENTS — The UpToDate editorial staff acknowledges Zalman Agus, MD, and Gunjeet K Kala Ahluwalia, MD, who contributed to an earlier version of this topic review.