It is thought that the explosion was caused by a fire which detonated 2,750 tonnes of ammonium nitrate that had been stored at the port for six years.
Ammonium nitrate is notoriously unstable under some conditions. The Texas City explosion of 1947, caused by ammonium nitrate in a ship’s hold, was the largest non-nuclear detonation in history. It killed over 500 people and sent a 15 foot wave across Galveston harbour. The ship’s 2000 pound anchor was blown 1.6 miles inland.
https://en.wikipedia.org/wiki/Texas_City_disaster,