Thin films of TiN x O y were deposited by d.c. magnetron sputtering on glass substrates using an (Ar + ,N 2 ) plasma and Ti target. The N 2 partial pressure was changed from 2.3 × 10 −4 mbar to 4.6 × 10 −3 mbar in order to obtain films with increasing nitrogen contents. X-ray photoelectron spectroscopy was used to determine the as-deposited composition. The presence of oxygen, which is probably due to contamination from the residual atmosphere in the vacuum chamber, is always detected, both in the surface layers and in the bulk of the films, confirming the formation of TiN x O y . When the nitrogen partial pressure was increased, a maximum for the nitrogen content in the films was reached, corresponding to a TiN 0.8 O 0.4 film composition. The nitrogen content of the films did not increase further for higher N 2 partial pressures. X-ray diffraction showed that each deposited layer had a rock salt structure, isomorphic to that for TiN, in which some nitrogen atoms would seem to be substituted by oxygen atoms in the anionic sub-lattice. Moreover, this crystalline TiN x O y phase is super-stoichiometric with this deposition method. To the best of our knowledge such results have already been observed on TiN films but it is the first time that they have been presented for TiN x O y thin layers.