This study focuses on the molecular features of three candidate behavioural genes in Drosophila melanogaster from the opposite slopes of Nahal Oren Canyon, Mount Carmel, Israel. These slopes display dramatic physical and biotic contrasts. Spatial variation of microclimatic conditions leads to adaptive differentiation and partial sexual isolation of populations, as suggested by our previous studies. The chosen candidate genes presumably contributing to genetic variation in sexual behaviour of Drosophila in the Canyon were desaturase, period, and no-on-transient A. These genes are known to include polymorphic repeated sequences, insertions/deletions, or nucleotide substitutions. The idea was that their polymorphism might be one of the determinants of behavioural peculiarities of flies derived from the opposite slopes. Indeed, interslope differences in the sequence encoding the (Thr-Gly)n repeat (exon 5) of the period gene were established, suggesting evolutionary functional importance. In particular, we unraveled variation in the length and composition of this region in different NFS (north-facing slope) and SFS (south-facing slope) lines. The ‘European’ allele (n = 20) was a 2.6-fold more abundant on the NFS compared to the SFS. This predominance probably gives some advantages for flies inhabiting wet and less warm conditions of the NFS. We suggest that repeat length/composition may influence the functional features of flies, i.e. habitat choice, nonrandom mating, and temperature adaptation. A series of female single-mate-choice tests show that females derived from NFS distinguish between males with specific per alleles (n = 17 vs. n = 20), as well as between males originated from the opposing slopes. Females from SFS were less discriminating and did not manifest significant deviation from random mating.