Heterocysts are specialized nitrogen-fixing cells formed by some filamentous cyanobacteria, such as Nostoc punctiforme, Cylindrospermum stagnale and Anabaena sphaerica, during nitrogen starvation. They fix nitrogen from dinitrogen (N2) in the air using the enzyme nitrogenase, in order to provide the cells in the filament with nitrogen for biosynthesis.