Pyrite, FeS 2 , thin films have been prepared by metallorganic chemical vapor deposition using tert-butyl disulfide (TBDS) and iron(III) acetylacetonate [Fe(acac) 3 ] as the precursors and H 2 as co-reactant. The reaction mechanism is studied with in situ mass spectrometry. The thermal decomposition of TBDS and Fe(acac) 3 has been investigated, as well as the synthesis of FeS 2 . A complicated gas-phase reaction chain occurs in the deposition reaction. In the first 1-2 cm of the deposition zone, thick rough films are formed, but further downstream in the reactor a smooth FeS 2 film is deposited. This remarkable change in morphology is accounted for in the proposed reaction mechanism.