AbstractMagnesium alloys are increasingly researched as temporary biodegradable metal implants in bone applications due to their mechanical properties which are more similar to bone than conventional implant metals and the fact that Magnesium occurs naturally within the body. However, the degradation processes in vivo and in particular the interaction of the bone with the degrading material need to be further investigated. In this study we are presenting the first quantitative comparison of the bone ultrastructure formed at the interface of biodegradable Mg–5Gd and Mg–10Gd implants and titanium and PEEK implants after 4, 8 and 12 weeks healing time using two-dimensional small angle X-ray scattering and X-ray diffraction. Differences in mineralization, orientation and thickness of the hydroxyapatite are assessed. We find statistically significant (p < 0.05) differences for the lattice spacing of the (310)-reflex of hydroxyapatite between titanium and Mg–xGd materials, as well as for the (310) crystal size between titanium and Mg–5Gd, indicating a possible deposition of Mg within the bone matrix. The (310) lattice spacing and crystallite size further differ significantly between implant degradation layer and surrounding bone (p < 0.001 for Mg–10Gd), suggesting apatite formation with significant amounts of Gd and Mg within the degradation layer.