Cyanobacteria also known as Cyanophyta, are a phylum of Gram-negative bacteria that obtain energy via photosynthesis. The name cyanobacteria comes from their color giving them their other name, "blue-green algae",though modern botanists restrict the term algae to eukaryotes and do not apply it to cyanobacteria, which are prokaryotes. They appear to have originated in freshwater or a terrestrial environment.