We dissected the relationship between genetic differentiation (Q ST ) for a trait and its underlying genes (G STq , differentiation for a quantitative locus) in an evolutionary context, with the aim of identifying the conditions in which these two measurements are decoupled. We used two parameters (y B and y W ) scaling the contributions of inter-and intrapopulation allelic covariation between genes controlling the trait of interest. We monitored the changes in y B and y W , Q ST and G STq over successive generations of divergent and stabilizing selection, in simulations for an outcrossing species with extensive gene flow. The dynamics of these parameters are characterized by two phases. Initially, during the earliest generations, differentiation of the trait increases very rapidly and the principal and immediate driver of Q ST is y B . During subsequent generations, G STq increases steadily and makes an equal contribution to Q ST . These results show that selection first captures beneficial allelic associations at different loci at different populations, and then targets changes in allelic frequencies. The same patterns are observed when environmental change modifies divergent selection, as shown by the very rapid response of y B to the changes of selection regimes. We compare our results with previous experimental findings and consider their relevance to the detection of molecular signatures of natural selection.