It is the ammonium nitrate itself that detonates. When heated, it reaches a state where it will detonate rather than burning or exploding.Anyone remember the West explosion? It was the same ammonium nitrate that caused that blast.
My company investigated the surrounding structural damage and found houses 1.5 miles from the epicenter of the blast that had roof damage. The explosive force also caused a ground ripple (earth quake) that measured three miles in diameter.
The cause of the explosion was a fire at the storage facility. The local fire departments showed up to put the fire out. No one, at the time, knew better than to add water to ammonium nitrate. The resulting vaporous gases are very explosive.
Fourteen local firemen died instantly in the blast. I had a chance to meet the Fire Chief on one of my visits.
He was in the storage area with his back to the fire when the explosion happened. He says he remembers turning around to adjust a water pressure gauge when the blast happened. He received a broken pelvis and broken upper right leg bone. He is the only person in the compound to survived.
Be careful with your fertilizer!!