Cyanobacteria are a group of photosynthetic bacteria, some of which are nitrogen-fixing, that live in a wide variety of moist soils and water either freely or in a symbiotic relationship with plants or lichen-forming fungi (as in the lichen genus Peltigera).