<p>Phosphorus (P) is often a limiting nutrient in soils and aquatic systems, but excessive concentrations can lead to eutrophication. The chemical forms in which P is retained in soils and sediments determine its bioavailability. Under reducing conditions, the ferrous phosphate mineral vivianite has been shown to be a major P burial phase in various environments such as coastal sediments. Depending on the local environmental geochemistry, ferrous iron (Fe<sup>2+</sup>) can be substituted by other divalent cations such as magnesium (Mg<sup>2+</sup>) and manganese (Mn<sup>2+</sup>). The substitution of Fe<sup>2+</sup> could alter mineralogical characteristics of vivianite, which influences its further reactivity and thus the P and iron (Fe) cycle. Despite the importance of divalent cation substitution in vivianite in the environment, questions remain if certain divalent cations are preferentially incorporated and how they compete for substitution.</p><p>Here, we assessed the competitive incorporation of Mn<sup>2+</sup> and Mg<sup>2+</sup> into vivianite by carrying out vivianite precipitation experiments in anoxic aqueous solutions at pH 7. Additionally, we explored how varying salinity simulating an estuarine gradient influences the incorporation of Mn<sup>2+</sup> and Mg<sup>2+</sup>. Changes in mineralogy with different degrees of Mn<sup>2+</sup>/ Mg<sup>2+</sup> substitution were studied with X-ray powder diffraction, Raman spectroscopy, total elemental dissolution and other techniques.</p><p>Based on 19 different vivianites, our results demonstrate that Fe<sup>2+</sup> is replaced by up to 50% by Mn<sup>2+</sup>/ Mg<sup>2+</sup> in the vivianite structure, with preferential incorporation of Mn<sup>2+</sup> over Mg<sup>2+</sup>. Increases in salinity seem to slightly enhance divalent cation incorporation. Following from our results, we will discuss the factors influencing divalent cation incorporation into vivianite, and how divalent cation substitution alters mineralogical characteristics. Finally, we will highlight how the substitution of Fe<sup>2+</sup> by other divalent cations potentially enhances P fixation in form of vivianite under Fe-limiting conditions.</p>