Potato virus X (PVX) occurs worldwide and causes an important potato disease. Complete PVX genomes were obtained from 326 new isolates from Peru, which is within the potato crop's main domestication center, 10 from historical PVX isolates from the Andes (Bolivia, Peru) or Europe (UK), and three from Africa (Burundi). Concatenated open reading frames (ORFs) from these genomes plus 49 published genomic sequences were analyzed. Only 18 of them were recombinants, 17 of them Peruvian. A phylogeny of the non-recombinant sequences found two major (I, II) and five minor (I-1, I-2, II-1, II-2, II-3) phylogroups, which included 12 statistically supported clusters. Analysis of 488 coat protein (CP) gene sequences, including 128 published previously, gave a completely congruent phylogeny. Among the minor phylogroups, I-2 and II-3 only contained Andean isolates, I-1 and II-2 were of both Andean and other isolates, but all of the three II-1 isolates were European. I-1, I-2, II-1 and II-2 all contained biologically typed isolates. Population genetic and dating analyses indicated that PVX emerged after potato's domestication 9000 years ago and was transported to Europe after the 15th century. Major clusters A-D probably resulted from expansions that occurred soon after the potato late-blight pandemic of the mid-19th century. Genetic comparisons of the PVX populations of different Peruvian Departments found similarities between those linked by local transport of seed potato tubers for summer rain-watered highland crops, and those linked to winter-irrigated crops in nearby coastal Departments. Comparisons also showed that, although the Andean PVX population was diverse and evolving neutrally, its spread to Europe and then elsewhere involved population expansion. PVX forms a basal Potexvirus genus lineage but its immediate progenitor is unknown. Establishing whether PVX's entirely Andean phylogroups I-2 and II-3 and its Andean recombinants threaten potato production elsewhere requires future biological studies.