Our results suggest that genetic variation in or near TAF3, MUC1/TRIM46, SHROOM3, and SLC22A7 are associated with the regulation of serum Mg2+ concentrations which may be partially explained by renal function, in type 2 diabetes. This evidence concerns the gene SLC22A7 and type 2 diabetes mellitus.