The compression of ammonium azide (AA) has been considered to be a promising route for producing high energy-density polynitrogen compounds. So far though, there is no experimental evidence that pure AA can be transformed into polynitrogen materials under high pressure at room temperature. We report here on high pressure (P) and temperature (T) experiments on AA embedded in N2 and on pure AA in the range 0–30 GPa, 300–700 K. The decomposition of AA into N2 and NH3 was observed in liquid N2 around 15 GPa–700 K. For pressures above 20 GPa, our results show that AA in N2 transforms into a new crystalline compound and solid ammonia when heated above 620 K. This compound is stable at room temperature and on decompression down to at least 7.0 GPa. Pure AA also transforms into a new compound at similar P–T conditions, but the product is different. The newly observed phases are studied by Raman spectroscopy and X-ray diffraction and compared to nitrogen and hydronitrogen compounds that have been predicted in the literature. While there is no exact match with any of them, similar vibrational features are found between the product that was obtained in AA + N2 with a polymeric compound of N9H formula.