Abstract
BACKGROUND: Magnesium (Mg) is an essential macronutrient required for numerous physiological and biochemical processes in plants. Both Mg deficiency and excess can disrupt plant growth and development, affecting a wide range of biological processes. Mg uptake and distribution are primarily mediated by the magnesium transporter (MGT) family. Karst landscape soils are typically enriched in calcium and magnesium, often leading to greater Mg uptake by plants than in non-karst environments. Yinshania henryi, a member of the Brassicaceae family endemic to the magnesium-enriched karst areas of southwestern China, demonstrates remarkable adaptability to environments with elevated Mg levels. However, the molecular basis underlying this adaptation, particularly the functional role of MGT genes, remains poorly understood. RESULTS: Here, we performed a genome-wide identification and characterization of the YhMGT gene family using phylogenetic analysis, RNA-seq, RT-qPCR, and subcellular localization assays. Seventeen YhMGT genes were identified and classified into three subfamilies (YhMRS2, YhNIPA, and YhMMgT), displaying conserved domain architectures but diversified gene structures and promoter elements associated with abiotic stress responses. RNA-seq and RT-qPCR analyses revealed distinct and anion-dependent transcriptional responses of YhMGT genes to MgCl₂ and MgSO₄ treatments, with MgCl₂ generally eliciting stronger induction at higher Mg concentrations, whereas MgSO₄ induced relatively attenuated or earlier responses. Notably, several YhNIPA genes exhibited contrasting expression patterns between chloride- and sulfate-associated Mg stress. Subcellular localization further demonstrated functional specialization, with YhNIPA6 localized to chloroplasts and YhNIPA3/YhNIPA8 targeted to the plasma membrane. CONCLUSIONS: Collectively, this study reveals that YhMGT genes are differentially regulated by Mg²⁺ supplied with distinct anions, highlighting an anion-dependent regulatory mechanism of magnesium transport in Y. henryi. These findings provide new insights into how karst plants coordinate magnesium homeostasis under high-Mg environments and offer a molecular framework for understanding Mg tolerance and ecological adaptation in karst ecosystems. SUPPLEMENTARY INFORMATION: The online version contains supplementary material available at 10.1186/s12864-026-12704-z.