SOX (SRY-related HMG box) proteins are transcription factors that have critical roles in the regulation of numerous developmental processes. They share at least 50% homology in their HMG domains, which bind the DNA element AACAAT. How different SOX proteins achieve specific regulation of target genes is not known. We determined the DNA-binding specificity of SOX9 using a random oligonucleotide selection assay. The optimal SOX9 binding sequence, AGAACAATGG, contained a core DNA-binding element AACAAT, flanked by 5' AG and 3' GG nucleotides. The specific interaction between SOX9 and AGAACAATGG was confirmed by mobility shift assays, DNA competition and dissociation studies. The 5' AG and 3' GG flanking nucleotides enhance binding by SOX9 HMG domain, but not by the HMG domain of another SOX factor, SRY. For SRY, different 5' and 3' flanking nucleotides are preferred. Our studies support the notion that SOX proteins achieve DNA sequence specificity through subtle preferences for flanking nucleotides and that this is likely to be dictated by signature amino acids in their HMG domains. Furthermore, the related HMG domains of SOX9 and Sox17 have similar optimal binding sites that differ from those of SRY and Sox5, suggesting that SOX factors may co-evolve with their DNA targets to achieve specificity.