Carbon and nitrogen speciation has been studied in high-pressure experiments in the C-O-H-N and C-O-H-N-Fe3C systems at 5.5 to 7.8 GPa and 1100 to 1500 degrees C using a split-sphere multi-anvil apparatus. Oxygen fugacity in the samples was either buffered by the Mo-MoO2 (MMO) and Fe-FeO (IW) equilibria using a double-capsule technique or left unbuffered. fO(2) varied from 2 log units below to +4 log units above the iron-wustite oxygen buffer (IW) depending on water contents in the charges and buffering. Ultra-reduced fluids contained NH3 as the dominant species, but its concentration was slightly lower, while CH4 was higher at higher temperatures. As oxygen fugacity and temperature increased to fO(2) 0.7 log units above IW and T >= 1400 degrees C, N-2 became the predominant nitrogen species; the dominance among carbon species changed from CH4 and C-2-C-5 alkanes to oxygenated hydrocarbons and higher alkanes. It has been found out for the first time that the N-2-rich fluid lacks methane at fO(2) 4 log units above IW but may bear a few percent of C2H6, C3H8, and C-15-C-18 alkanes and within one percent of alcohols, aldehydes, ketones, carboxylic acids, and furans. Thus, the NH3 enrichment of fluids and the nitrogen storage capacity of silicates at depths similar to 200 km are expected to be the greatest in cold (1100-1200 degrees C) and reduced continental lithospheric mantle. In a hotter lithosphere of similar to 1400 degrees C, the concentrations of NH3 and N-2 in fluids are similar, and the nitrogen storage capacity of silicates should be relatively low. The stability of some higher alkanes and oxygenated hydrocarbons in nitrogen-rich fluids near the enstatite-magnesite-olivine-diamondigraphite (EMOG/D) equilibrium suggest that these carbon species, together with N-2, can survive at the redox barrier, where silicate or silicate-carbonate melts capture them and entrain to shallow mantle. (C) 2016 Elsevier B.V. All rights reserved.