The oscillator of the circadian clock of cyanobacteria is composed of three proteins, KaiA, KaiB, and KaiC, which together generate a self-sustained ∼24-h rhythm of phosphorylation of KaiC. The mechanism propelling this oscillator has remained elusive, however. We show that stacking interactions between the CI and CII rings of KaiC drive the transition from the phosphorylation-specific KaiC-KaiA interaction to the dephosphorylation-specific KaiC-KaiB interaction. We have identified the KaiB-binding site, which is on the CI domain. This site is hidden when CI domains are associated as a hexameric ring. However, stacking of the CI and CII rings exposes the KaiB-binding site. Because the clock output protein SasA also binds to CI and competes with KaiB for binding, ring stacking likely regulates clock output. We demonstrate that ADP can expose the KaiB-binding site in the absence of ring stacking, providing an explanation for how it can reset the clock.