Mating behavior is arguably the most important and fundamental behavior in animals. In the fruit fly, Drosophila melanogaster, both experience-dependent and independent aspects of mating behavior are regulated by the genes controlling circadian rhythms. Wild-type D.melanogaster show robust circadian rhythms in their mating activity, with the lowest point at zeitgeber time 12. These rhythms are intact under constant dark conditions and are abolished in mutants for the clock genes, period (per) and timeless (tim), indicating that the mating activity of D.melanogaster is under the control of an endogenous clock. Females are solely responsible for these rhythms, because the rhythms are lost when clock mutant females are paired with wild-type males, but not vice versa. Although the circadian clock might not regulate innate male courtship behavior, its plasticity is controlled by a clock gene, per. A male fly previously paired with a mated female that releases courtship-inhibiting cues subsequently reduces his courtship activities toward a virgin female. This experience-dependent depression of male courtship is based on associative learning, which can induce long-term memory (LTM) lasting at least fivedays. The courtship LTM is not under the influence of a circadian clock or most of the clock genes. Interestingly, however, mutants for per, whose expression is controlled by the cAMP responsible transcriptional factor, CREB, are defective in LTM, suggesting that per plays a key role in LTM formation, independent of the core oscillator of the circadian clock. Thus, clock genes are involved in both innate mating behavior and its plasticity. © 2006 The Authors; Journal compilation © 2006 Japanese Society of Sleep Research.