To establish that a stable, long-lasting form of memory exists in Drosophila, we trained third-instar larvae by electroshocking them in the presence of a specific odor using a Pavlovian conditioning procedure. We show that conditioned odor avoidance produced in larvae still was present in adults 8 d later. Such memory through metamorphosis was specific to the temporal pairing of odor and shock; presentations of odors alone or shock alone did not produce a change. Thus, the memory involved associative processes. We also show that similar training of the single-gene memory mutants dunce and amnesiac did not yield any detectable learning in larvae or memory retention in adults, suggesting that these mutations interfere with long-term memory (LTM) formation even if LTM is induced independently of earlier memory retention processes.