SEPARATION IN CYANOBACTERIA. “The key enzyme for nitrogen fixation, nitrogenase, is sensitive to oxygen, and is thus inhibited by oxygenic photosynthesis. In filamentous cyanobacteria, this conflict is resolved by a spatial segregation of the two processes. A small proportion of the cells differentiate into heterocysts that fix nitrogen and do not engage in photosynthesis, and these heterocysts exchange metabolites with the vegetative cells in the same filament.”
http://rspb.royalsocietypublishing.org/content/early/2011/12/05/rspb.2011.1999.short