High concentration (15% in a molar ratio) Er-doped TiO 2 and ZrO 2 sol–gel layers, annealed under an oxygen flow, at 300 and 650 °C, respectively, were studied at the erbium L III edge (8358 eV) by X-ray near edge structure spectroscopy (XANES) and extended X-ray absorption fine structure spectroscopy (EXAFS) in order to obtain some useful information about the local atomic arrangement around the incorporated rare earths. Transmission electronic microscopy (TEM) experiments were also carried out in order to support the X-ray absorption spectroscopy (XAS) studies by a knowledge of the global structure of the sol–gel layer. The analysis of the XAS data reveals that, in the case of an annealing treatment at 300 °C, the local atomic structure surrounding the erbium ion appears amorphous for both samples, while after an annealing treatment at 650 °C, a crystalline structure around the dopant is strongly dependent on the nature of the lattice cation (Ti or Zr). Indeed, for such an annealing temperature, the local atomic environment around the erbium ion appears to be amorphous in the case of an anatase matrix while it seems to have crystallized around the dopant in the case of zirconia. Furthermore, for both these compounds the XAS data reveal that a pairing effect between the erbium ions probably occurs. The TEM studies performed on the samples annealed at 650 °C show the appearance of other phases different from the matrix, confirming this fact. For both compounds, the analysis of these sets of data reveals that the erbium ion has not formed metallic erbium in the matrix. For the Er-doped TiO 2 sol–gel layers, it can be concluded that the rare earth has not precipitated in the form of erbium oxide clusters. Whereas, for the Er-doped ZrO 2 sol–gel layers, nothing can be deduced about the possible appearance of Er 2O 3. It can be then concluded that the appearance of another phase, with the formula near Zr 3Er 4O 12, likely occurs in the case of the Er-doped ZrO 2 sol–gel layer annealed at 650 °C, while a solid solution of Er x Ti y O z was formed in the case of the Er-doped TiO 2 sol–gel layer (annealed at 650 °C). Nevertheless it should be noted that the high concentration of erbium doping used on this study (15%) is not the one which presents the most useful interest for applications as optical devices. Such a high concentration of erbium, selected for the XAS measurement, provides a clue to the chemical mechanisms which could explain the optical properties of the rare earth shown in former studies.