Genetic factors are clearly attributed to the susceptibility of ankylosing spondylitis (AS). The human leucocyte antigen (HLA)-B27 proved to be the very useful marker for diagnosing AS. The aim of this study was to determine the prevalence of HLA-B27 subtypes in Taiwan and to investigate whether these subtypes may be of help in predicting the diagnosis of AS. A total of 314 patients with AS and a control group of 71 subjects positive for HLA-B27 detected by flow cytometry analysis were recruited for the study. HLA-B27 subtypes were confirmed by the polymerase chain reaction-sequence-specific primers and sequence-specific oligonucleotide probing. Four B27 alleles were identified: B*2704, B*2705, B*2706 and B*2707. HLA-B*2704 was the predominant allele. There were significant differences in the distribution of HLA-B27 subtypes between patients with AS and controls. Five of them who were homozygous for the B*2704 allele were solely found in AS group but not in controls. Statistical analysis showed that B*2704 was positively associated with AS, which suggested an increased possibility of having AS. Other HLA-B27 subtypes showed no strong correlation with AS. In the Taiwanese population, susceptibility to AS was determined by the presence of HLA-B*2704. Although B*2706 was reported to have a negative association with AS in Taiwanese, Thai and Chinese Singaporean populations, we report, in our study, two AS patients with B*2706 (0.6%). Disease heterogeneity suggests that other than genetic background, many pathogenic factors could be associated with AS. This may need to be investigated with a larger group of patients with AS and controls.