The first essential condition for nitrogen-fixation is legume-bacteria relationship. Rhizobium bacteria cause nodule formation for this association. The enzyme nitrogenase is highly sensitive to the molecular oxygen. The nodules protect these enzymes by an oxygen scavenger called leghaemoglobin.
Rhizobium bacteria are free living in soil. They are symbionts, which can fix atmospheric nitrogen for plants.