The reactivity of La + , Sm + , Eu + and Gd + with NH 3 (g) and ND 3 (g) is studied in the reaction cell of a quadrupole ICP-MS. For Ln + = La + and Gd + , the primary reaction channel is the formation of the LnNH + protonated nitride leading to H 2 elimination. The LnNH(NH 3) + 1-5 ammonia complexes of the Ln protonated nitride are further generated. Sm + and Eu + are much less reactive: the protonated nitride is not detected, and only small amounts of Ln(NH 3) 0-6 + are observed. DFT, MP2, CCSD(T) and CASSCF/CASPT2 calculations are used to explore the potential energy surfaces. For the La + and Gd + ions of f-block elements, the reaction pathways have three steps: first the formation of LnNH 3 + , then the isomerization to HLnNH 2 + , and finally the loss of H 2 associated with the formation of a Ln-N triple bond in the final product LnNH +. On the other hand, Sm + and Eu + are not able to form stable complexes. This was rationalized in terms of energy barriers for the chemical reactions and electronic promotion energies for these Ln + atoms.