Many species of migratory birds migrate in a series of solitary nocturnal flights. Between flights, they stop to rest and refuel for the next segment of their journey. The mechanism controlling this behaviour has long remained elusive. Here, we show that wild-caught migratory redstarts (Phoenicurus phoenicurus) are consistent in their flight scheduling. An advanced videographic system enabled us to determine the precise timing of flight activity in redstarts caught at a northern European stopover site during their return trip from Africa. Birds were held captive for three days in the absence of photoperiodic cues (constant dim light) and under permanent food availability. Despite the absence of external temporal cues, birds showed clear bimodal activity patterns: intense nocturnal activity alternating with diurnal foraging and resting periods. The onset of their migratory activity coincided with the time of local sunset and was individually consistent on consecutive nights. The data demonstrate that night-migrating birds are driven by autonomous circadian clocks entrained by sunset cues. This timekeeping system is probably the key factor in the overall control of nocturnal songbird migration.