Animal temperament refers to the inherent behavioural and emotional characteristics of an animal, influencing how it interacts with its environment. The selection of sheep for temperament can change the temperament traits of the selected line and improve the welfare and production (reproduction, growth, immunity) of those animals. To understand the genetics that underly variation in temperament in sheep, and how selection on temperament can affect other production traits, a genome-wide association study was carried out. Merino sheep from lines selected for traits of calm and nervous temperament, and a commercial population, on which the temperament traits had never been assessed, were used. Blood samples from the three populations were genotyped using an Illumina GGP Ovine 50 K Genotyping BeadChip. The calm and nervous populations in the selected lines presented as distinct genetic populations, and 2 729 of the 45 761 single nucleotide polymorphisms (SNPs) had significantly different proportions between the two lines. Of those 2 729 SNPs, 2 084 were also associated with temperament traits in the commercial population. A genomic annotation identified 81 candidate genes for temperament, nearly half of which are associated with disorders of social behaviour in humans. Five of those 81 candidate genes are related to production traits in sheep. Two genes were associated with personality disorders in humans and with production traits in sheep. We identified significant enrichment in genes involved in nervous system processes such as the regulation of systemic arterial blood pressure, ventricular myocyte action, multicellular organismal signalling, ion transmembrane transport, and calcium ion binding, suggesting that temperament is underpinned by variation in multiple biological systems. Our results contribute to understanding of the genetic basis of animal temperament which could be applied to the genetic evaluation of temperament in sheep and other farm animals.