The temperature-dependent microscopic structure of plasma-deposited a-C:H and magnetron-sputtered a-C films, in situ sputter cleaned by argon bombardment, has been investigated by near-edge (NEXAFS) and extended (EXAFS) x-ray-absorption fine-structure studies. We find that the microscopic structure of the two films becomes indistinguishable after sputtering with a loss of hydrogen for the a-C:H sample. The structure of the sputtered films at 30°C is characterized by a first-neighbor C-C bond length of 1.445(10) A. Upon annealing the bond length approaches that of graphite (1.421 A) with a value of 1.427(10) A at 1050°C, the highest annealing temperature used. Analysis of the EXAFS amplitude of the first-neighbor shell leads to a two-phase structural model consisting of a graphitelike network and a statically and dynamically disordered random matrix. The fraction of carbon atoms in the graphitelike network increases from 60(6)% at 30°C to 92(9)% at 1050°C. Analysis of the higher-neighbor-shell EXAFS signals leads to a model for the graphitelike regions, consisting of a network of conjugated odd- and even-membered rings, without long-range order. In contrast, the random matrix is suggested to be a mostly chainlike network of double and single bonds. Our results suggest that the graphitelike matrix is a precursor state for crystallization. © 1988 The American Physical Society.