TiN films were deposited onto various substrates including InP by rf sputtering in an N2/Ar ambient at room temperature. The rf power, the ratio of gas flows, and the total pressure were systematically varied. To optimize the deposition conditions, the plasma excitation processes were examined by optical emission spectroscopy using a calibrated crystal thickness monitor to determine the corresponding deposition rates. At pressures below 15×10−3 mbar, the deposition rate is linearly proportional to the intensity of the optical emission at 364.2 nm, I(Ti), associated with excited Ti. Although I(Ti) increases with the total pressure, at a given rf power, the resulting deposition rate decreases at pressures above 20×10−3 mbar due to greater gas-phase scattering. The [N]/[Ti] ratio in the deposited films, as determined by Rutherford backscattering and Auger electron spectroscopy, is found to be linearly correlated with the ratio of the optical emission intensities of excited N+2(391.4 nm) and Ti at 364.2 nm, I(N+2)/I(Ti).