Here's a very good article about Ammonium nitrate.
It tells how safe the stuff really is, compared to explosives.
It also explains how one of the byproducts of an Ammonium nitrate fire is oxygen. Thats why when a big pile of it burns, some of it can melt forming a closed container, where the fire supplying it's own oxygen won't smother, and builds up tremendous pressure until it detonates.
It also explains why this was a detonation, and not an explosion.
edit, sorry, it was
this article that explained the explode vs detonate thing.