The human leukocyte antigen (HLA) genes play a major role in adaptive immune response and are used to differentiate self antigens from non-self ones. HLA genes are hypervariable with nearly every locus harboring over a dozen alleles. This variation plays an important role in susceptibility to multiple autoimmune diseases and needs to be matched on for organ transplantation. Unfortunately, HLA typing by serological methods is time consuming and expensive compared to high-throughput single nucleotide polymorphism (SNP) data. We present a new computational method to infer per-locus HLA types using shared segments identical by descent (IBD), inferred from SNP genotype data. IBD information is modeled as graph where shared haplotypes are explored among clusters of individuals with known and unknown HLA types to identify the latter. We analyze performance of the method in a previously typed subset of the HapMap population, achieving accuracy of 96% in HLA-A, 94% in HLA-B, 95% in HLA-C, 77% in HLA-DR1, 93% in HLA-DQA1, and 90% in HLA-DQB1 genes. We compare our method to a tag SNP-based approach, and demonstrate higher sensitivity and specificity. Our method demonstrates the power of using shared haplotype segments for large-scale imputation at the HLA locus.