Magnesium plays an important role as a cofactor in many of the body's critical functions and reactions. A deficiency or excess of extracellular magnesium can produce significant signs and symptoms. Hypomagnesaemia is a common finding in hospitalised patients, especially those in critical care areas. Anaesthetising hypomagnesaemic patients may exacerbate pre-existing cardiovascular disease and increase the risk of perioperative dysrhythmias. A low serum magnesium level usually suggests a total body deficiency of magnesium. Treatment of magnesium deficiency is by parenteral magnesium and should be instituted prior to surgery. Hypermagnesaemia is often iatrogenic and is more likely in patients with renal dysfunction who are receiving oral or parenteral magnesium. The specific antidote is intravenous calcium. Anaesthetised patients with high serum magnesium levels are at risk from hypotension, potentiation of non-depolarising neuromuscular blockers, postoperative respiratory failure and cardiac arrest.