AbstractWe report on the first in situ synchrotron radiation powder X-ray diffraction study (SR-PXD) of the ammonolysis reaction of selected alkaline and alkaline earth metal hydrides (i.e., LiH, NaH, KH, MgH2, and CaH2). The investigation was performed using an in situ SR-PXD pressure cell at an initial NH3 pressure of 6.5 bar in a range of temperature between room temperature (RT) and 350 °C. The results of this work give new important insights into the formation of metal amides and imides starting from the corresponding metal hydrides. LiH was observed to react with NH3 to form LiNH2 already at RT, and then it decomposes into Li2NH at 310 °C through the formation of nonstoichiometric intermediates of the Li1+xNH2–x form. The formation of NaNH2 takes place nearly at RT (28 °C), and it melts at 180 °C. As for LiH, KH reacts with NH3 at RT to surprisingly form, what it seems to be, cubic KNH2. However, we believe this phase to be a solid solution of KH in KNH2. At high temperature, the possible formation of several solid solutions of K(NH2)1–yHy with defined composition is also observed. The formation of Mg(NH2)2 was observed to starts at around 220 °C, from the interaction γ-MgH2 and NH3. At 350 °C, when all γ-MgH2 is consumed, the formation of Mg(NH2)2 stops and MgNH is formed by the reaction between β-MgH2 and NH3. Our results indicate that the formation of the γ-MgH2 is a key step in the synthesis of Mg(NH2)2 at low temperature (e.g., via ball milling technique). CaH2 was observed to react with NH3 at around 140 °C to form CaNH. At higher temperature the appearance of new reflections of possible Ca1+xNH phases, with the same crystalline structure of CaNH but with a smaller cell parameter was observed.