Modulates intracellular Mg(2+) levels to maintain cellular integrity upon Mg(2+) limitation. Acts by binding and stabilizing the Mg(2+) transporter MgtA, thereby leading to increased intracellular level of Mg(2+). May inhibit FtsH proteolysis of MgtA. Interacts with MgtA. Induced by very low Mg(2+) via the PhoQ/PhoP two-component regulatory system (PubMed:28512220). Induced by SDS/EDTA (envelope stress), at 45 degrees Celsius, repressed in minimal glucose or glycerol medium and by the thiol oxidant diamide (at protein level) (PubMed:19734316). Expressed in both exponential and stationary phase in rich medium; expression is higher in exponential phase (at protein level) (PubMed:30837344). Upon Mg(2+) depletion, deletion mutants have lower intracellular Mg(2+) levels than wild-type cells.