Important for energy metabolism, neurotransmission, bone stability, and other cellular functions, Mg(2+) has well-established and undisputedly critical roles in adult tissues. Its contributions to early embryonic development are less clearly understood. For decades it has been known that gestational Mg(2+) deficiency in rodents produces teratogenic effects. More recent studies have linked deficiency in this vital cation to birth defects in humans, including spina bifida, a neural fold closure defect in humans that occurs at an average rate of 1 per 1000 pregnancies. The first suggestion that Mg(2+) may be playing a more specific role in early development arose from studies of the TRPM7 and TRPM6 ion channels. TRPM7 and TRPM6 are divalent-selective ion channels in possession of their own kinase domains that have been implicated in the control of Mg(2+) homeostasis in vertebrates. Disruption of the functions of these ion channels in mice as well as in frogs interferes with gastrulation, a pivotal process during early embryonic development that executes the emergence of the body plan and closure of the neural tube. Surprisingly, gastrulation defects produced by depletion of TRPM7 can be prevented by Mg(2+) supplementation, indicating an essential role for Mg(2+) in gastrulation and neural fold closure. The aim of this review is to summarize the data emerging from molecular genetic, biochemical and electrophysiological studies of TRPM6 and TRPM7 and provide a model of how Mg(2+), through these unique channel-kinases, may be impacting early embryonic development.