In the early 1980s, the observation that Drosophila melanogaster larvae differed in their foraging behavior laid the foundation for the work that would later lead to the discovery of the foraging gene (for ) and its associated foraging phenotypes, rover and sitter. Since then, the molecular characterization of the for gene and our understand- ing of the mechanisms that maintain its phenotypic variants in the laboratory have progressed enormously. However, the significance and dynamics of such variation are yet to be investigated in nature. With the advent of next-generation sequencing, it is now possible to identify loci underlying adaptation of populations in response to en- vironmental variation. Here, I present results of a genotype-environment association analysis that quantifies variation at the for gene among samples of D. melanogaster structured across space and time. These samples consist of published genomes of adult flies collected worldwide, and at least twice per site of collection (during spring and fall). Both an analysis of genetic differentiation based on Fst values, and an anal-ysis of population structure revealed an east-west gradient in allele frequency. This gradient may be the result of spatially varying selection driven by the seasonality of precipitation. These results support the hypothesis that different patterns of gene flow as expected under models of isolation by distance and potentially isolation by envi- ronment are driving genetic differentiation among populations. Overall, this study is essential for understanding the mechanisms underlying the evolution of foraging behavior in D. melanogaster.