The authors show that a circadian clock that regulates locomotor activity in larval zebrafish develops gradually over the first 4 days of life and that exposure to entraining signals late in embryonic development is necessary for initiation of robust behavioral rhythmicity. When zebrafish larvae were transferred from a light-dark (LD) cycle to constant darkness (DD) on the third or fourth day postfertilization, the locomotor activity of almost all fish was rhythmic on days 5 to 9 postfertilization, with peak activity occurring during the subjective day. Rhythm amplitude was higher after four LD cycles than after three LD cycles. When embryos were transferred from LD to DD on the second day postfertilization, only about half of the animals later displayed statistically significant activity rhythms. These rhythms were noisier and of lower amplitude, but phased normally. When zebrafish were raised in DD beginning at 14 h postfertilization, only 22% of them expressed significant circadian rhythmicity as larvae. These rhythms were of low amplitude and phase-locked to the time of handling on the third day rather than to the maternal LD cycle. These results show that behavioral rhythmicity in zebrafish is regulated by a pacemaking system that is sensitive to light by the second day of embryogenesis but continues to develop into the fourth day. This pacemaking system requires environmental signals to initiate or synchronize circadian rhythmicity.