Cellular functions require adequate homeostasis of several divalent metal cations, including Mg(2+) and Zn(2+). Mg(2+), the most abundant free divalent cytoplasmic cation, is essential for many enzymatic reactions, while Zn(2+) is a structural constituent of various enzymes. Multicellular organisms have to balance not only the intake of Mg(2+) and Zn(2+), but also the distribution of these ions to various organs. To date, genes encoding Mg(2+) transport proteins have not been cloned from any multicellular organism. We report here the cloning and characterization of an Arabidopsis thaliana transporter, designated AtMHX, which is localized in the vacuolar membrane and functions as an electrogenic exchanger of protons with Mg(2+) and Zn(2+) ions. Functional homologs of AtMHX have not been cloned from any organism. Ectopic overexpression of AtMHX in transgenic tobacco plants render them sensitive to growth on media containing elevated levels of Mg(2+) or Zn(2+), but does not affect the total amounts of these minerals in shoots of the transgenic plants. AtMHX mRNA is mainly found at the vascular cylinder, and a large proportion of the mRNA is localized in close association with the xylem tracheary elements. This localization suggests that AtMHX may control the partitioning of Mg(2+) and Zn(2+) between the various plant organs.