With the decreasing minimum feature size of integrated microcircuits, a low-temperature, chlorine-free CVD process is needed for the deposition of TiN diffusion barriers. A problem during the thermal deposition of titanium nitride from organometallic precursors, such as tetrakis(dimethylamido)titanium, is the high content of carbon in the films. In situ XPS study reveals that most of the carbon is present as CHx inclusions with a smaller but not negligible amount of carbidic component. This can be avoided by using ammonia, but the high rate of the reaction in the gas phase makes the control of the film growth difficult. Most of the problems can be resolved when using hydrogen afterglow.