The enzyme responsible for N<latex>$_2$</latex> fixation, nitrogenase, is only found in prokaryotes. It consists of two metalloproteins, both irreversibly destroyed by exposure to the O<latex>$_2$</latex> of air. The MoFe-protein binds N<latex>$_2$</latex> and the Fe-protein, after activation by MgATP, supplies electrons. H<latex>$_2$</latex> is evolved during the reduction of N<latex>$_2$</latex> to NH<latex>$_3$</latex> and can become the sole reaction in the absence of N<latex>$_2$</latex>; valuable information has been obtained by exploiting the ability of nitrogenase to reduce substrates such as acetylene, azides and cyanides. Substrate quantities of MgATP are required for all such reactions. The sensitivity of nitrogenase to oxygen is an important physiological constraint on its use and distribution; the ATP requirement and metal contents are less serious constraints. O<latex>$_2$</latex> and NH<latex>$_3$</latex> regulate synthesis and sometimes function of nitrogenase. Nitrogen fixation by Klebsiella pneumoniae is genetically encoded by 17 genes (the nif genes) in a cluster of seven or eight operons. The functions of several of these genes are known and the outlines of their regulation can be discerned. The nif cluster can be transferred to new prokaryotic genera, sometimes yielding new diazotrophic strains or species; they have been transferred to yeast and are silent. They have been cloned and alien DNA (lac) has been fused into nif. Transfer of expressible nif to new genetic backgrounds has probably occurred in Nature and may be exploitable for agriculture.