Careful there boss.....I'm starting to have flashbacks to OChem and my richardhead professorAs ammonium nitrate is a salt, both the cation, NH4+, and the anion, NO3-, can take part in a chemical reaction.
Solid ammonium nitrate decomposes on heating. At temperatures below around 300 C the decomposition is mainly to nitrous oxide (laughing gas) and water. Though this was far from funny
NH4NO3 → N2O + 2H2O
At higher temperatures, the following reaction predominates.
2NH4NO3 → 2N2 + O2 + 4H2O
Both decomposition reactions are exothermic. Consequently, when the mass of ammonium nitrate is greater than the critical mass the decomposition is explosive. Many NH4NO3 explosions with loss of lives, have occurred. The brown color in an explosion cloud is due to nitrogen dioxide, a secondary reaction product.