Most animals rely on circadian clocks to synchronize their physiology and behavior with the day/night cycle. Light and temperature are the major physical variables that can synchronize circadian rhythms. Although the effects of light on circadian behavior have been studied in detail in Drosophila, the neuronal mechanisms underlying temperature synchronization of circadian behavior have received less attention. Here, we show that temperature cycles synchronize and durably affect circadian behavior in Drosophila in the absence of light input. This synchronization depends on the well characterized and functionally coupled circadian neurons controlling the morning and evening activity under light/dark cycles: the M cells and E cells. However, circadian neurons distinct from the M and E cells are implicated in the control of rhythmic behavior specifically under temperature cycles. These additional neurons play a dual role: they promote evening activity and negatively regulate E cell function in the middle of the day. We also demonstrate that, although temperature synchronizes circadian behavior more slowly than light, this synchronization is considerably accelerated when the M cell oscillator is absent or genetically altered. Thus, whereas the E cells show great responsiveness to temperature input, the M cells and their robust self-sustained pacemaker act as a resistance to behavioral synchronization by temperature cycles. In conclusion, the behavioral responses to temperature input are determined by both the individual properties of specific groups of circadian neurons and their organization in a neural network.