Biofilms are consortia of bacteria that are held together by an extracellular matrix. Cyanobacterial biofilms, which are highly ubiquitous and inhabit diverse niches, are often associated with biological fouling and cause severe economic loss. Information on the molecular mechanisms underlying biofilm formation in cyanobacteria is scarce. We identified a mutant of the cyanobacterium Synechococcus elongatus, which unlike the wild type, developed biofilms. This biofilm-forming phenotype is caused by inactivation of homologues of type II secretion /type IV pilus assembly systems and is associated with impairment of protein secretion. The conditioned medium from a wild-type culture represses biofilm formation by the secretion-mutants. This suggested that the planktonic nature of the wild-type strain is a result of a self-suppression mechanism, which depends on the deposition of a factor to the extracellular milieu. We also identified two genes that are essential for biofilm formation. Transcript levels of these genes are elevated in the mutant compared with the wild type, and are initially decreased in mutant cells cultured in conditioned medium of wild-type cells. The particular niche conditions will determine whether the inhibitor will accumulate to effective levels and thus the described mechanism allows switching to a sessile mode of existence.