Phosphonate scale inhibitors (SIs) applied in downhole squeeze applications may be retained in the near-well formation through adsorption and/or precipitation mechanisms. In this paper we focus on the properties of precipitated “mixed” calcium and magnesium phosphonate complexes formed by five common phosphonate species (OMTHP DETPMP HMTPMP HMDP EDTMPA). By “mixed” we mean anionic SI bound to calcium and magnesium divalent cations. The stoichiometry (Ca/P and Mg/P molar ratios) in various precipitates is established experimentally and the effect of solution pH on the molar ratios of Ca/P and Mg/P in the precipitate is determined. Static precipitation tests were carried out varying the amounts of Ca2+ and Mg2+ present in the system at test temperatures ranging from 20oC to 95oC at a fixed [SI] = 2000ppm. The solution molar ratio of Mg2+/Ca2+ was varied; however the ionic strength of each test solution was kept constant thus eliminating the effect of varying ionic strength. In addition tests were also carried out with (i) only Ca2+ and SI present and (ii) only Mg2+ and SI present. The molar ratios of Ca/P and Mg/P in the solid precipitates were determined by assaying for Ca2+ Mg2+ and P in the supernatant liquid under each test condition by ICP spectroscopy (initial [Ca2+] [Mg2+] and [P] are known but additionally they are measured experimentally). We show experimentally that the molar ratios of precipitated Ca2+/P and Mg2+/P (or Ca2+/SI and Mg2+/SI) depends on the nature of the SI (i.e. how many M2+ binding sites there are per molecule); solution pH; the relative magnitude of the SI binding constants to Ca2+ and Mg2+ at the test pH; and the solution molar ratio of Mg2+/Ca2+; for all phosphonates tested. It is found that as pH increases the combined molar ratio of Ca2+/P + Mg2+/P i.e. n1+n2 in the SI_Can1_Mgn2 complex increases up to a theoretical maximum depending on the chemical structure of the phosphonate. Our findings corroborate proposed phosphonate SI-Ca-complex structures which were presented and discussed in two SPE technical papers (SPE 155114 2012 and SPE 164051 2013). In addition the precipitation behaviour of the various compounds is modelled theoretically by developing and solving a set of simplified equilibrium equations. Good quantitative agreement is shown comparing the predictions of the equilibrium solubility model with experiment. Such models can be used directly in the modelling of field phosphonate precipitation squeeze treatments.