Highly sp3 -bonded, nearly hydrogen-free carbon-based materials can exhibit extremely low friction and wear in the absence of any liquid lubricant, but this physical behavior is limited by the vapor environment. The effect of water vapor on friction and wear are examined as a function of applied normal force for two such materials in thin film form -one that is fully amorphous in structure (tetrahedral amorphous carbon, or ta-C) and one that is polycrystalline with <10 nm grains (ultrananocrystalline diamond, or UNCD). Tribologically-induced changes in the chemistry and carbon bond hybridization at the surface are correlated with the effect of the sliding environment and loading conditions through ex-situ, spatially resolved near-edge x-ray absorption fine structure (NEXAFS) spectroscopy. At sufficiently high relative humidity (RH) levels and/or sufficiently low loads, both films quickly achieve a low steady-state friction coefficient and subsequently exhibit low wear. For both films, the number of cycles necessary to reach the steady-state is progressively reduced for increasing RH levels. Worn regions formed at lower RH and higher loads have a higher concentration of chemisorbed oxygen than those formed at higher RH, with the oxygen singly-bonded as hydroxyl groups (C-OH). While some carbon rehybridization from sp 3 to disordered sp 2 bonding is observed, no crystalline graphite formation is observed for either film. Rather, the primary solid-lubrication mechanism is the 2 passivation of dangling bonds by OH and H from the dissociation of vapor-phase H 2 O. This vapor-phase lubrication mechanism is highly effective, producing friction coefficients as low as 0.078 for ta-C and 0.008 for UNCD, and wear rates requiring thousands of sliding passes to produce a few nanometers of wear.