We describe the use of restriction analysis on PCR-amplified DNA for detecting all B*27 subtypes except B*2710 and B*2711 (i.e. from B*2701 to B*2709). After detecting B*27 by Sty I, double digestions consisting of Sty I plus another informative enzyme led to subtype assignment. We used mismatched primers to create restriction sites when necessary. The method avoids group-specific amplifications and other laborious optimization procedures. It was successfully tested on a panel of well characterized cell lines covering different B*27 subtypes. Then, we studied a group of 57 ankylosing spondylitis patients and 746 controls from the south of Spain. B*27 showed a very strong association with the disease (OR=211.27, P=10(-7)). B*2702 and B*2705 distribution in controls (20% and 77.1%, respectively) differed from previously reported data in the Spanish population. We unexpectedly found the B*2707 allele in our population (one control).