Potato, one of the most important staple crops, originates from the highlands of the equatorial Andes. There, potatoes propagate vegetatively via tubers under short days, constant throughout the year. After their introduction to Europe in the sixteenth century, potatoes adapted to a shorter growing season and to tuber formation under long days. Here, we traced the demographic and adaptive history of potato introduction to Europe. To this end, we sequenced 88 individuals that comprise landraces, modern cultivars and historical herbarium samples, including specimens collected by Darwin during the voyage of the Beagle. Our findings show that European potatoes collected during the period 1650-1750 were closely related to Andean landraces. After their introduction to Europe, potatoes admixed with Chilean genotypes. We identified candidate genes putatively involved in long-day pre-adaptation, and showed that the 1650-1750 European individuals were not long-day adapted through previously described allelic variants of the CYCLING DOF FACTOR1 gene. Such allelic variants were detected in Europe during the nineteenth century. Our study highlights the power of combining contemporary and historical genomes to understand the complex evolutionary history of crop adaptation to new environments.