In some organisms longevity, growth, and developmental rate are improved when they are maintained on a light/dark cycle, the period of which "resonates" optimally with the period of the endogenous circadian clock. However, to our knowledge no studies have demonstrated that reproductive fitness per se is improved by resonance between the endogenous clock and the environmental cycle. We tested the adaptive significance of circadian programming by measuring the relative fitness under competition between various strains of cyanobacteria expressing different circadian periods. Strains that had a circadian period similar to that of the light/dark cycle were favored under competition in a manner that indicates the action of soft selection.