Cyanobacteria are photosynthetic bacteria and usually lives in aerobic conditions. They synthesize nitrogenase enzyme (required for nitrogen fixation) which is susceptible to oxidation. Photosynthetic oxygen evolution and nitrogen fixation cannot occur simultaneously in one single cell so they develop heterocysts which are nondividing cells which have lost capacity of oxygenic photosynthesis and which contain the enzyme nitrogenase.