This article appeared in a journal published by Elsevier. The attached copy is furnished to the author for internal non-commercial research and education use, including for instruction at the authors institution and sharing with colleagues.Other uses, including reproduction and distribution, or selling or licensing copies, or posting to personal, institutional or third party websites are prohibited. Titanium nitride TiN x (0.1 ≤ x ≤ 1) thin films were deposited onto Al 2 O 3 (0001) substrates using reactive magnetron sputtering at substrate temperatures (T s ) ranging from 800 to 1000°C and N 2 partial pressures (pN 2 ) between 13.3 and 133 mPa. It is found that Al and O from the substrates diffuse into the substoichiometric TiN x films during deposition. Solid-state reactions between the film and substrate result in the formation of Ti 2 O and Ti 3 Al domains at low N 2 partial pressures, while for increasing pN 2 , the Ti 2 AlN MAX phase nucleates and grows together with TiN x . Depositions at increasingly stoichiometric conditions result in a decreasing incorporation of substrate species into the growing film. Eventually, a stoichiometric deposition gives a stable TiN(111) || Al 2 O 3 (0001) structure without the incorporation of substrate species. Growth at T s 1000°C yields Ti 2 AlN(0001), leading to a reduced incorporation of substrate species compared to films grown at 900°C, which contain also Ti 2 AlN(101 ̅ 3) grains. Finally, the Ti 2 AlN domains incorporate O, likely on the N site, such that a MAX phase oxynitride Ti 2 Al(O,N) is formed. The results were obtained by a combination of structural methods, including X-ray diffraction and (scanning) transmission electron microscopy, together with spectroscopy methods, which comprise elastic recoil detection analysis, energy dispersive X-ray spectroscopy, and electron energy loss spectroscopy.