text: **MDS analysis.**We compute*f*2-statistics using the Twigstats function 
  f2_blocks_from_Relate between all pairs of individuals and between all 
  individuals and an outgroup (Han Chinese people in SGDP) using the 
  Relate genealogies of SGDP modern and imputed ancient genomes. 
  We set the argument*t*to specify a time cut-off and set the argument 
  use_muts to FALSE to compute these*f*-statistics on branches of the 
  genealogy and to TRUE to compute these only on the mutations. We 
  use these to compute*f*3(outgroup, indiv1, indiv2) = 0.5 × (*f*2(outgroup, 
  indiv1) +*f*2(outgroup, indiv2)*− f*2(indiv1, indiv2)) for every pair of indi- 
  viduals, and store 1*− f*3(outgroup, indiv1, indiv2) in a symmetric*N*×*N*
  matrix (where*N*is the number of individuals) for which we then 
  compute an MDS using the R function cmdscale. 
  
  **Fine-scale structure simulation.**Our simulation in Extended Data 
  Fig. 5a emulates the emergence of a fine-scale population structure 
  and is adapted from ref. 39. In this simulation, populations split 100 
  generations ago into 25 subpopulations followed by a period in which 
  individuals are allowed to migrate at a rate of 0.01 between adjacent 
  populations in a 5 × 5 grid. The diploid effective population size is 500 
  in each of the 25 populations, and 10,000 in the ancestral population. 
  We simulate ten replicates of chromosome 10, with a human-like muta- 
  tion rate of 1.25 × 10−8 and hotspot recombination map. We sample two 
  diploid individuals from each population. Furthermore, we sample 100 
  individuals from an ancestral population that splits from the 25 target 
  populations 100 generations ago, before the emergence of structure 
  in these 25 populations. Relate trees are inferred assuming true muta- 
  tion rates, recombination rates and average coalescence rates across 
  all samples. 