Due to imbalanced groundwater withdrawal, Mg concentration has relatively increased in the majority of irrigation waters in arid and semiarid regions, which may negatively affect soil properties and productivity. Therefore, this study was aimed at understanding to what extent varying Ca to Mg ratios in the calcareous soil solution alter the ratio on the exchangeable sites. To do so, four calcareous soils were equilibrated with eight Ca to Mg ratios and then the relative adsorption of Ca and Mg ions on the exchangeable sites and the CEC of soil samples were measured using a modified silver-thiourea method. To quantitatively explain our observations, we used the Gaines-Thomas equation, and its parameters were independently derived from the dissolution/precipitation reactions of carbonate minerals. Our results showed that among Ca and Mg, the one that had the lowest concentration in the soil solution was preferably adsorbed at exchangeable sites. The modeling results indicated that Ca and Mg ions are adsorbed with wide ranges of adsorption energies, which on the macroscopic scale are interpreted as ion preference. Ion pair formation of Ca and Mg with Cl in the soil solution had no significant effect on their surface reactions. In addition, modeling indicated that at high Ca or Mg concentration, the surface species stoichiometry may gradually change from bidentate to monodentate to accommodate more ions. Thus, it can be concluded that by application of Mg-enriched irrigation water the risk for Mg accumulation in calcareous soils is highly increased which in turn increases the risk for soil degradation and indirectly for soil sodification. K E Y W O R D S imbalanced Ca to Mg ratio, ion exchange, silver thiourea, soil degradation, soil exchangeable sites, water quality 1 | INTRODUCTION Climate change and its consequences, global warming and altered rainfall pattern and intensity, are among the major challenges on our planet worldwide (IPCC, 2018; Trenberth, 2011). There is now a strong consensus that arid and semiarid regions are the most vulnerable to and are even already affected by climate change and its consequences such as desertification, soil degradation, and drying of surface aquifers (Connor, Schwabe, King, & Knapp, 2012; Tomaz et al., 2020). In such regions, the consumption of groundwater will most likely become imbalanced and withdrawal of groundwater exceeds its recharge that in turn negatively impacts the groundwater table and its quality indices (Bouaroudj et al., 2019; Qadir & Oster, 2004). Salinity and sodicity are the principal agricultural water quality concerns in arid and semiarid regions (Qadir, Schubert, Ghafoor, & Murtaza, 2001). Application of saline and/or sodic irrigation water induces land degradation that in turn decreases soil productivity (Vyshpolsky et al., 2008). Besides these concerns, recent reports of groundwater analysis indicate an ongoing important shift in the ionic