The structural properties of Er-doped AlNO epilayers grown by radio frequency magnetron sputtering were studied by Extended X-ray Absorption Fine Structure (EXAFS) spectra recorded at the Er L 3 edge. The analysis revealed that Er substitutes for Al in all the studied samples and the increase in Er concentration from 0.5 to 3.6 at.% is not accompanied by formation of ErN, Er 2 O 3 or Er clusters. Simultaneously recorded X-ray Absorption Near Edge Structure (XANES) spectra verify that the bonding configuration of Er is similar in all studied samples. The Er-N distance is 2 constant at 2.18-2.19 {AA} i.e. approximately 15% larger than the Al-N bondlength, revealing that the introduction of Er in the cation sublattice causes considerable local distortion. The Debye-Waller factor, which measures the static disorder, of the second nearest shell of Al neighbors, has a local minimum for the sample containing 1% Er that coincides with the highest photoluminescence efficiency of the sample set.