The three cyanobacterial Kai proteins and ATP are capable of generating an autonomous rhythm of KaiC phosphorylation in a test tube. As the period is approximately 24 hours and is stable in a wide temperature range, this rhythm is thought to function as the basic oscillator of the cyanobacterial circadian system. We have examined the rhythm under various temperature cycles and found that it was stably entrained by a temperature cycle of 20-28 hours. As the period length was not altered by temperature, entrainment by period change could be excluded from possible mechanisms. Instead, temperature steps between 30 degrees and 45 degrees C and vice versa shifted the phase of the rhythm in a phase-dependent manner. Based on the phase response curves of the step-up and step-down in temperature, phase shift by single temperature pulse was estimated using a nonparametric entrainment model (discontinuous phase jump by external stimuli). The predicted phase shift was consistent with the experimentally measured phase shift. Next, successive phase shifts caused by repeated temperature cycles were computed by two phase response curves and compared with actual entrainment of the rhythm. As the entrainment pattern observed after various combinations of temperature cycles matched the prediction, it is likely that nonparametric entrainment functions even in the simple three-protein system. We also analyzed entrainment of KaiC phosphorylation by temperature cycle in cyanobacterial cells and found both the parametric and the nonparametric models function in vivo.