Nickel oxide thin films with a thickness of 100 nm were deposited on oxidized silicon wafers by rf magnetron sputtering from a NiO target in an Ar (nonreactive case) and an Ar+O-2 atmosphere with various oxygen contents (reactive cases). The as-deposited films possess high compressive stresses (up to 3700 MPa) which decrease irreversibly during annealing between 150 and 500 degreesC. Compositional and microstructural analyses were performed on as-deposited and annealed films by means of electron probe microanalysis, transmission electron microscopy, x-ray diffraction, x-ray photoelectron spectroscopy, thermal-desorption spectrometry, and magnetization measurements. All as-deposited thin films consist of NiOx with x ranging between about 1.15 and 1.27. These oxygen-excess films are thermally unstable. They decompose during heat treatment into thermally more stable, oxygen-poorer NiO and/or metallic Ni. This decomposition is the reason for the observed irreversible stress changes. (C) 2003 American Institute of Physics.