Abstract.This work reports an X-ray absorption near-edge structure spectroscopy (XANES) study at both Mn and Zn K-edge in Zn 0.95 Mn 0.05 O thin films prepared with different sputtering gases (pure Ar, Ar/N 2 and Ar/O 2 ). We have studied the local order around Mn in the films, with special emphasis in the role played by both oxygen and zinc vacancies and by the structural distortion associated with the substitution of Zn by Mn in the ZnO host. Our results indicate that the dependence of the magnetic properties of these Mn:ZnO thin films with the different sputtering gas used in the preparation is related to the structural distortion around Mn sites.