Selection of appropriate oviposition sites is essential for progeny survival and fitness in generalist insect species, such as Drosphila melanogaster, yet little is known about the mechanisms regulating how environmental conditions and innate adult preferences are evaluated and balanced to yield the final substrate choice for eggdeposition. Female D. melanogaster are attracted to food containing acetic acid (AA) as an oviposition substrate. However, our observations reveal that this egg-laying preference is a complex process, as it directly opposes an otherwise strong, default behavior of positional avoidance for the same food. We show that 2 distinct sensory modalities detect AA. Attraction to AA-containing food for the purpose of egg-laying relies on the gustatory system, while positional repulsion depends primarily on the olfactory system. Similarly, distinct central brain regions are involved in AA attraction and repulsion. Given this unique situation, in which a single environmental stimulus yields 2 opposing behavioral outputs, we propose that the interaction of egg-laying attraction and positional aversion for AA provides a powerful model for studying how organisms balance competing behavioral drives and integrate signals involved in choice-like processes.choice behavior ͉ gustatory system ͉ olfactory system ͉ mushroom body ͉ ellipsoid body O viposition provides a powerful yet simple means for monitoring preference behavior in Drosophila melanogaster, since a laid egg represents a marker for female position. Past studies have used egg laying as a readout for conditions advantageous to progeny development (1, 2), in which oviposition preference effectively separates larvae of different sibling species of Drosophila. Egg laying has also been used to detect aversion toward compounds toxic to both larvae and adults (3, 4). Furthermore, numerous studies have used patterns of oviposition to distinguish subtle differences in host plant preferences, which have provided insights into resource requirements and ecological behaviors of different Drosophila species (5, 6).Despite numerous studies using oviposition-site selection as a behavioral readout, direct study of the relevant sensory circuits and the oviposition program itself have been initiated only recently in D. melanogaster (7,8). To investigate the genetic mechanisms and neural circuits regulating this important behavioral choice in D. melanogaster, we developed a simple yet robust 2-choice assay that utilizes acetic acid (AA), a naturally occurring product of fruit fermentation, as an egg-laying attractant (9, 10). However, in addition to verifying a strong egg-laying preference for AA, we surprisingly observed D. melanogaster show a strong positional aversion to the same AA-containing food. We demonstrate that when sampling for oviposition sites, females integrate input from distinct sensory modalities to choose a particular behavioral output from 2 competing options: ovipositional attraction for and positional repulsion to AA. Egg-laying preference is p...