The XAS data were processed by using ATHENA (for normalization and background removal) and ARTEMIS (to fit known models to the experimental EXAFS data). These two programs belong to the main package IFEFFIT (v. 1.2.11) . The respective Ni-phosphates (Ni-struvite NH4NiPO4•6H2O, Ni-dittmarite NH4NiPO4•H2O) phases were used as model structures, the scattering paths for first and second coordination sphere were theoretically modelled and fitted to the measured spectra. In a simple one pot synthesis, crystalline single-phase M-struvite with M = Mg, Ni Co and NixCo1-x-struvite powders were obtained as starting materials, and shared the same precursor structure (Figure , Figure , ESI: Figure ). M-struvite contains water and ammonia in its structure, and therefore potential phase transitions should occur at elevated temperatures as a result of a dehydration and degassing processes. Based on this assumption, to evaluate such thermally-induced phase transitions, a combined TGA/DSC analysis was performed on the dry crystalline struvite powders at T ≤ 300°C (Figure , ESI: Figure ).