Fertilizer can explode*. We all know that. It was a key ingredient in the bomb that destroyed Oklahoma City's Alfred P. Murrah Federal Building in 1995. Last night, a factory full of the stuff went up with enough force that United States Geological Survey seismographs registered it as a magnitude 2.1 earthquake.

Ammonium nitrate is the chemical that makes these dramatic displays possible. But creating an explosion isn't as simple as just having a pile of ammonium nitrate — let alone a pile of fertilizer — sitting around. We've come to think of this as pretty volatile stuff. But, according to chemist Jimmie Oxley, ammonium nitrate is a lot less dangerous than you might guess. Despite a history of high-profile explosions, like the one that happened last night, ammonium nitrate isn't considered to be that big of a danger. In fact, Oxley called it a "marginal explosive" — a chemical that is mostly safe, but can become dangerous when the conditions are just right.

Oxley studies energetic materials at the University of Rhode Island. You could say that she studies stuff that explodes, but it actually goes a lot further than that. Energetic materials aren't just explosives. The classification includes anything that produces heat as it decomposes. That includes ammonium nitrate, but it also includes your compost pile.

"If you keep a compost heap you might have seen it steaming in the winter sometimes," Oxley said. "And it can even catch on fire. That's because biorganisms break down the compost and release heat. Sometimes, that process releases enough heat that it causes the whole pile to catch."

When it comes to energetic materials, the thing you really want to avoid is a runaway reaction, when a substance starts producing enough heat, on its own, to catch itself on fire and then keep that fire going.

But, amazingly, even that isn't enough to ensure that ammonium nitrate will explode, Oxley said. A couple of years ago, she put together a list of ammonium nitrate accidents that had happened around the world — usually in factories, or during shipping. There are 24 cases on the list that involved fire. Of those, in only 11 cases did the event go from fire to detonation.

In fact, since the 1950s, ammonium nitrate-based explosives have basically supplanted the older dynamite explosives used in mining and other industries, precisely because they are so much safer and harder to detonate. Ammonium nitrate isn't even classed as an explosive, Oxley said.

"It's very difficult to get it to detonate at a reasonable scale," she said. "You can toss 50 pounds of it in the back of your car and it will do nothing. With something like dynamite even a gram or two is highly explosive."

But, obviously, ammonium nitrate does explode sometimes. So what makes those circumstances different?

The most important factor is how much ammonium nitrate you have. Fifty pounds ain't nothing. But a couple hundred tons of the stuff is a different story. If that huge amount of ammonium nitrate also catches on fire … then you have a problem.

As it burns, ammonium nitrate goes through chemical changes that lead to the production of oxygen. And what does a fire need to keep going and get bigger? Why, oxygen.

The largest industrial accident in the United States happened in 1947, off the coast of Texas City, Texas, when two shipping vessels full of ammonium nitrate exploded. Six hundred people were killed. The explosion might not have happened had the captain of one of the two ships adopted a different tactic for fire-fighting. When he realized his hold was in flames, Oxley said, he had a choice — drown the fire or smother it. The captain opted for smothering it, sealing the hold and trying to starve the fire of oxygen. But the pyre of burning ammonium nitrate was producing its own oxygen. Instead of putting out the flames, the act of sealing the hold allowed the fire to burn bigger and longer without inturruption.

Contrary to some explanations, you don't need a physical jolt to make a great big pile of burning ammonium nitrate explode. The fire alone will do just fine, Oxley said. That's because, depending on how the ammonium nitrate is packed together, the heat can create a sealed plug, trapping hot gases.

Think of a cigarette, she said. When you light it, most of the gas flows away from the cigarette. But some doesn't. That stuff that hangs around helps to pre-warm the parts of the cigarette that haven't already caught fire. That same basic process can happen with a pile of burning ammonium nitrate, only, in that situation, the pre-warmed chemical can end up fusing together. The space behind the plug keeps on being heated and gases form. Hot gas expands, but, behind the plug, it has nowhere to go. Eventually, the gas will break through the seal and the force of that will trigger an explosion.

UPDATE: According to news reports, ammonium nitrate might not have been only chemical culprit at work in West, Texas. The factory had large stores of both ammonium nitrate and anhydrous ammonia — a flammable gas — according to the LA Times. The ammonium nitrate storage building was at the center of the blast, according to local Dallas/Ft. Worth news. It's not clear which of these chemicals was the source of the explosion. But if it had more to do with the anhydrous ammonia then the chemistry explanation for all of this would be different than what I've posted here. Just FYI.

*Fertilizer can also detonate. Although we laypeople use them as synonyms, "explode" and "detonate" actually mean different things. The force of detonations travels faster than the speed of sound. Explosions don't. Both can still kill people, but a detonation is a lot more likely to cause severe damage to large buildings. Experts will probably be debating for a while whether the West, Texas incident was an explosion or a detonation, Oxley said. Meanwhile, she suspects that the Boston Marathon bombings were likely to have been an explosion.

• Image: Ammonium Nitrate, a Creative Commons Attribution (2.0) image from philliecasablanca's photostream

• Image: Ammonium Nitrate, a Creative Commons Attribution Share-Alike (2.0) image from mgspiller's photostream