Explosive ammonium nitrate fertilizer gives plants life but takes human lives away when it detonates. However, chemical wizardry can remove the fertilizer’s explosive aspect. Recently, an engineer at Sandia National Laboratory gave away his formula for transforming deadly ammonium nitrate into safer, but equally farmer-friendly fertilizer.

Instead of patenting his process, Sandia engineer Kevin Fleming made his formulation free in order to reduce the threat from fertilizer bombs and help farmers.

ANALYSIS: Discovery Shows Deadly Gas Can Act As Fertilizer

Ammonium nitrate recently blew up a Texas factory and has served as an ingredient in bombs from Oklahoma City to Afghanistan.

By mixing ammonium nitrate with iron sulfate, Fleming created non-explosive ammonium sulfate and iron nitrate. The reaction works because the ammonium ion, or electrically charged molecule, in ammonium nitrate doesn’t hold tightly to to the nitrate ion.

“The ions would rather be with different partners,” Fleming said in a press release. “The iron looks at the ammonium nitrate and says, ‘Can I have your nitrate rather than my sulfate?’ and the ammonium nitrate says, ‘I like sulfate, so I’ll trade you.’”

Switching fertilizers may benefit farmers as well. The Afghan government banned ammonium nitrate, although smugglers still ferry the fertilizer into the country. In the U.S., the Ammonium Nitrate Security Program proposes to regulate the sale of more than 25 pounds of the fertilizer. Non-explosive ammonium sulfate and iron nitrate mixtures could be sold without such regulations to farmers around the world.

NEWS: Could Your Town Explode?

The new fertilizers may be better suited for Afghanistan’s alkaline soils than ammonium nitrate and may improve the nutritional quality of crops.

“It does good things for soil health,” said Fleming. “It takes alkaline soil and makes it more neutral, closer to an ideal pH level. The closer you get to a neutral pH, the more crops grow. Crop yield would improve significantly. And iron-containing fertilizer added to the soil would be taken up in crops and help fight anemia and other iron deficiencies in people who eat them.”

IMAGE: The bomb disposal team of the Afghan Army 215 Corps neutralizes an IED in Sangin, Helmand. (Al Jazeera English, Wikimedia Commons)