The human androgen-receptor gene (HUMARA; GenBank) contains a highly polymorphic trinucleotide repeat in the first exon. We have found that the methylation of HpaII and HhaI sites less than 100 bp away from this polymorphic short tandem repeat (STR) correlates with X inactivation. The close proximity of the restriction-enzyme sites to the STR allows the development of a PCR assay that distinguishes between the maternal and paternal alleles and identifies their methylation status. The accuracy of this assay was tested on (a) DNA from hamster/human hybrid cell lines containing either an active or inactive human X chromosome; (b) DNA from normal males and females; and (c) DNA from females showing nonrandom patterns of X inactivation. Data obtained using this assay correlated substantially with those obtained using the PGK, HPRT, and M27 beta probes, which detect X inactivation patterns by Southern blot analysis. In order to demonstrate one application of this assay, we examined X inactivation patterns in the B lymphocytes of potential and obligate carriers of X-linked agammaglobulinemia.