Mg deficiency contributes to osteoporosis directly by acting on crystal formation and on bone cells and indirectly by impacting the secretion and the activity of the parathyroid hormone and by promoting low-grade inflammation. This evidence concerns the gene PTH and osteoporosis.