For 10,000 years pigs and humans have shared a close and complex relationship. From domestication to modern breeding practices, humans have shaped the genomes of domestic pigs. Here we present the assembly and analysis of the genome sequence of a female domestic Duroc pig (Sus scrofa) and a comparison with the genomes of wild and domestic pigs from Europe and Asia. Wild pigs emerged in South East Asia and subsequently spread across Eurasia. Our results reveal a deep phylogenetic split between European and Asian wild boars ∼1 million years ago, and a selective sweep analysis indicates selection on genes involved in RNA processing and regulation. Genes associated with immune response and olfaction exhibit fast evolution. Pigs have the largest repertoire of functional olfactory receptor genes, reflecting the importance of smell in this scavenging animal. The pig genome sequence provides an important resource for further improvements of this important livestock species, and our identification of many putative disease-causing variants extends the potential of the pig as a biomedical model. This study presents the assembly and analysis of the genome sequence of a female domestic Duroc pig and a comparison with the genomes of wild and domestic pigs from Europe and Asia; the results shed light on the evolutionary relationship between European and Asian wild boars. The domestic pig (Sus scrofa) is an important livestock species, its genome shaped by thousands of years of domestication and, latterly, sophisticated breeding practices. A high-quality draft genome sequence for a female domestic Duroc pig is published in this issue of Nature, under the auspices of the Swine Genome Sequencing Consortium. Comparisons of the genomes of wild and domestic pigs shed light on the evolutionary relationship between European and Asian wild boars, and reveal the rapid evolution of genes involved in the immune response and in olfaction. The authors identify many possible disease-causing gene variants, increasing the potential of the pig as a biomedical model, and present a detailed analysis of endogenous porcine retroviruses, knowledge of which is important for the possible use of pigs in xenotransplantation.