Abstract. Learning is thought to be adaptive in variable environments, whereas constant, predictable environments are supposed to favor unconditional, genetically fixed responses. A dichotomous view of behavior as either learned or innate ignores a potential evolutionary interaction between the learned and innate components of a behavioral response. We addressed this interaction in the context of oviposition substrate choice in Drosophila melanogaster, asking two main questions. First, will learning also evolve in a constant environment in which it always pays to show the same choice? Second, how does an opportunity to learn affect the evolution of the innate (genetic) component of oviposition substrate choice? We exposed experimental populations to four selection regimes, involving selection on oviposition substrate preference (an orange versus a pineapple medium). In two selection regimes the flies were selected for preference either for the orange medium, or for the pineapple medium. In the remaining two selection regimes the flies were also selected for preference for either orange or pineapple, but additionally could use past experience (aversion learning) to decide which medium it paid to avoid. Lines exposed to the latter selection regimes evolved improved learning ability, indicating that learning may be advantageous even if the same behavioral response is favored every generation. Furthermore, of the two selection regimes that favored oviposition on the pineapple medium, the regime that allowed for learning led to the evolution of a stronger innate preference for pineapple, than the regime that did not allow for learning. In contrast, of the two regimes that selected for oviposition on the orange medium, the one that allowed for learning led to a smaller evolutionary change of the innate preference. Thus, an opportunity to learn facilitated the evolution of innate preference under selection for preference for pineapple, but hindered it under selection for preference for orange. We discuss possible mechanisms for this effect. Behavioral responses of an animal reflect an interplay between an innate and a learned component (by innate we mean the heritable component, which determines the behavior of a naive individual). The innate, genetic component reflects the evolutionary history of the population. The learned component reflects experience accumulated within the individual's lifetime. The ability to modify behavior based on experience (i.e., learning ability) is itself a product of evolution, with notable genetic differences between related species or even conspecific populations (Gould-Beierle and Kamil 1998;Girvan and Braithwaite 1998;Jackson and Carter 2001). It is usually argued that learning is advantageous in variable environments, that is, when the fitness consequences of a given behavioral action change from generation to generation, or even within an individual's life span (for reviews see Johnston 1982; Stephens 1991; Dukas 1998). (Obviously, for learning to be useful the environment must not c...