We have studied the composition and mechanical properties of silicon‐oxynitride layers made by plasma‐enhanced deposition, using different gas mixtures. The composition of the as‐deposited layers was determined by means of Rutherford backscattering spectroscopy (RBS), Fourier transform infrared spectroscopy (FTIR), Auger electron spectroscopy (AES), and refractive index measurements. FTIR spectra reveal the presence of Si‐H, N‐H, Si‐N, and Si‐O bonds. On the basis of the RBS and the IR data, it is concluded that all oxygen is incorporated as Si‐O‐Si groups in the films. This is confirmed by the absence of an O‐H absorption band in the IR spectra around 3620 cm−1. The mechanical stress and the etch rate in buffered HF of plasma oxynitride layers strongly depend on the amount of oxygen and hydrogen incorporated in the layer. With increasing oxygen content, the mechanical stress decreases and the etch rate increases. Heat‐treatment at temperatures higher than the deposition temperature leads to a densification of the film due to hydrogen desorption and cross‐linking.