Nitrogen , amongst the most abundant metals in the interstellar medium , has a peculiar chemistry which differs from those of carbon and oxygen . Recent observations of several nitrogen-bearing species in the interstellar medium suggest abundances in sharp disagreement with current chemical models . Although some of these observations show that some gas-grains processes are at work , gas-phase chemistry needs first to be revisited . Strong constraints are provided by recent Herschel observations of nitrogen hydrides in cold gas . The aim of the present work is to perform a comprehensive analysis of the interstellar chemistry of nitrogen , focussing on the gas-phase formation of the smallest polyatomic species and in particular nitrogen hydrides . We present a new chemical network in which the kinetic rates of critical reactions have been updated based on recent experimental and theoretical studies , including nuclear spin branching ratios . Our network thus treats the different spin symmetries of the nitrogen hydrides self-consistently together with the ortho and para forms of molecular hydrogen . This new network is used to model the time evolution of the chemical abundances in dark cloud conditions . The steady-state results are analysed , with special emphasis on the influence of the overall amounts of carbon , oxygen , and sulphur . Our calculations are also compared with Herschel/HIFI observations of NH , { { \mathrm { NH } _ { \vphantom { } 2 } } } , and { { \mathrm { NH } _ { \vphantom { } 3 } } } detected towards the external envelope of the protostar IRAS 16293-2422 . The observed abundances and abundance ratios are reproduced for a C/O gas-phase elemental abundance ratio of \sim 0.8 , provided that the sulphur abundance is depleted by a factor larger than 2 . The ortho-to-para ratio of { H _ { 2 } } in these models is \sim { 10 ^ { -3 } } . Our models also provide predictions for the ortho-to-para ratios of { { \mathrm { NH } _ { \vphantom { } 2 } } } and { { \mathrm { NH } _ { \vphantom { } 3 } } } of \sim 2.3 and \sim 0.7 respectively . We conclude that the abundances of nitrogen hydrides in dark cloud conditions are consistent with the gas-phase synthesis predicted with our new chemical network .