Nitrogen-fixation by bacteria does not occur in the presence of:
Oxygen
Nitrogenase is an enzyme involved in the fixation of free nitrogen of atmosphere. The fixation of nitrogen gas take place in the anaerobic environment as nitrogenase is inactivated by O2.