Nitrogen fixation is a chemical process by which molecular dinitrogen (N2) is converted into ammonia (NH3). It occurs both biologically and abiologically in chemical industries. Biological nitrogen fixation or diazotrophy is catalyzed by enzymes called nitrogenases. These enzyme complexes are encoded by the Nif genes (or Nif homologs) and contain iron, often with a second metal (usually molybdenum, but sometimes vanadium).
Some nitrogen-fixing bacteria have symbiotic relationships with plants, especially legumes, mosses and aquatic ferns such as Azolla. Looser non-symbiotic relationships between diazotrophs and plants are often referred to as associative, as seen in nitrogen fixation on rice roots. Nitrogen fixation occurs between some termites and fungi. It occurs naturally in the air by means of NOx production by lightning.
Fixed nitrogen is essential to life on Earth. All nitrogen-containing organic compounds such as DNA and proteins contain nitrogen. Industrial nitrogen fixation underpins the manufacture of all nitrogenous industrial products, which include fertilizers, pharmaceuticals, textiles, dyes and explosives.