Breed differences in susceptibility to diabetes mellitus in dogs suggest an underlying genetic component to the pathogenesis of the disease. There is little evidence for an equivalent of human type 2 diabetes in dogs, and it has been proposed that canine diabetes is more comparable to the type 1 form of the disease. Certain immune response genes, particularly those encoding major histocompatibility complex molecules involved in antigen presentation, are important in determining susceptibility to human type 1 diabetes. We tested the hypothesis that canine major histocompatibility complex genes (known as the dog leucocyte antigen) are associated with diabetes in dogs. A total of 530 diabetic dogs and more than 1000 controls were typed for dog leucocyte antigen, and associations were found with three specific haplotypes. The DLA‐DRB1*009/DQA1*001/DQB1*008 haplotype shows the strongest association with diabetes in the UK dog population. This haplotype is common in diabetes‐prone breeds (Samoyed, cairn terrier and Tibetan terrier) but rare in diabetes‐resistant breeds (boxer, German shepherd dog and golden retriever), which could explain differences in the prevalence of diabetes in these different breeds. There is evidence that the DLA‐DQA1*001 allele is also associated with hypothyroidism, suggesting that this could represent a common susceptibility allele for canine immune‐mediated endocrinopathies.