Ammonium nitrate is produced by the reaction of ammonia with nitric acid. It is a stable compound, but it can decompose explosively when it is heated or subjected to shock or friction.
The explosion in Beirut was caused by a large amount of ammonium nitrate that was stored in a warehouse at the port. The ammonium nitrate was ignited by a fire, which caused it to decompose explosively. The explosion caused widespread damage to the port and surrounding areas.
Ammonium nitrate is a hazardous material, and it must be stored and handled properly to prevent accidents.